cnn_finetune icon indicating copy to clipboard operation
cnn_finetune copied to clipboard

ZeroPadding2D((1,1), name = '...') vs. Conv2D(...., padding = 'same', ... )

Open Sucran opened this issue 7 years ago • 0 comments

Hi, I'm rewritting the code resnet152.py in Keras2 API, and I had this question: why you built a layer ZeroPadding2D whose name do not appear in caffe .prototxt x = ZeroPadding2D((1, 1), name=conv_name_base + '2b_zeropadding')(x)
x = Convolution2D(nb_filter2, kernel_size, kernel_size, name=conv_name_base + '2b', bias=False)(x) in the function conv_block()? ( since I don't know the mechanism to conver a caffemodel to keras model and I'm wondering this operation is necessary for the mechanism, right? ?)

Because this can be done easily to use just one Conv2D function x = Conv2D(nb_filter2, (kernel_size, kernel_size), padding='same', name=conv_name_base + '2b', use_bias=False)(x)

and when I finish my code, if you like, may be I can do something API update for you repo. looking forward to your reply : )

Sucran avatar Mar 07 '18 11:03 Sucran