1
$\begingroup$

In Keras, the border_mode = 'valid' doesn't zero pad the input. Thus, we subsequently get an output feature map that is not the same size as the input. Likewise, setting border_mode = 'same' gives output feature maps as the input. My question is if we set border_mode = 'same', should we also perform zero padding using the zero_padding function?

$\endgroup$
1
$\begingroup$

I think I found the answer to this here https://github.com/fchollet/keras/issues/1984. If the stride is 1, border_mode = 'same' does the job of padding to ensure that the output feature maps are the same size as the input.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.