在Keras中,应用Convolution2D
图层后,图像的输出形状会改变1,但是当我们对Caffe应用相同的模型时,该图像的输出形状会起作用。我正在复制IS&T 2017论文的结果。在那篇论文中,他们正在使用具有类似模型的Caffe。
我的模型摘要:
_________________________________________________________________
Layer (type) Output Shape Param #
=================================================================
conv2d_1 (Conv2D) (None, 61, 61, 32) 1568
_________________________________________________________________
**max_pooling2d_1 (MaxPooling2 (None, 30, 30, 32) 0**
_________________________________________________________________
conv2d_2 (Conv2D) (None, 26, 26, 48) 38448
_________________________________________________________________
max_pooling2d_2 (MaxPooling2 (None, 13, 13, 48) 0
_________________________________________________________________
conv2d_3 (Conv2D) (None, 9, 9, 64) 76864
_________________________________________________________________
max_pooling2d_3 (MaxPooling2 (None, 4, 4, 64) 0
---------------------------------------------------------------------
这会导致此错误
ValueError: Negative dimension size caused by subtracting 5 from 4 for 'conv2d_4/convolution' (op: 'Conv2D') with input shapes: [?,4,4,64], [5,5,64,128].
所有尺寸和补丁大小均相同。