eric2323223
eric2323223

Reputation: 3628

How to set arbitrary padding value to Keras conv2d filter?

I am trying to implement inception module myself using Keras but i find both 'valid' and 'same' padding cannot meet my need. for instance, i would like to get 9×9 feature map from applying a 5×5 filter to 11×11 input, could anyone tell me how to do it?

Upvotes: 1

Views: 606

Answers (1)

Elinx
Elinx

Reputation: 1214

Did you try using ZeroPadding2D() layer? Suppose your stride is 1, set the padding parameter (3, 3), then use same for conv2d. Here is the description.

Upvotes: 3

Related Questions