Skip to content

Commit bfb23d0

Browse files
committed
解决报错ValueError
运行时报错: ValueError: Cannot feed value of shape (32, 1, 28, 28) for Tensor `conv2d_23_input:0`, which has shape `(64, 1, 28, 28)` 因为数据集的长度要是batch_size的整数倍,或者把这个改成batch_input_shape=(None,28, 28,1)就可以了
1 parent f94533e commit bfb23d0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kerasTUT/6-CNN_example.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737

3838
# Conv layer 1 output shape (32, 28, 28)
3939
model.add(Convolution2D(
40-
batch_input_shape=(64, 1, 28, 28),
40+
batch_input_shape=(None, 1, 28, 28),
4141
filters=32,
4242
kernel_size=5,
4343
strides=1,

0 commit comments

Comments
 (0)