具有扩展批处理形状的Keras Conv2D

时间:2020-07-01 22:36:18

标签: tensorflow keras tensorflow2.0 convolution

您好,我尝试使用keras Conv2D

中的最后一个示例
# With extended batch shape [4, 7]:  
import tensorflow as tf
input_shape = (4, 7, 127, 127, 3)
x = tf.random.normal(input_shape)
y = tf.keras.layers.Conv2D(2, 3, activation='relu', input_shape=input_shape[2:])(x)
print(y.shape)

但是我遇到形状错误:

ValueError: Input 0 of layer conv2d_11 is incompatible with the layer: expected ndim=4, found ndim=5. Full shape received: [4, 7, 127, 127, 3]

0 个答案:

没有答案