Uneven padding in caffe

127 views
Skip to first unread message

Josh Gruenstein

unread,
Jul 9, 2018, 8:01:19 PM7/9/18
to Caffe Users
Hi all.   I'm trying to implement a network in Caffe that requires uneven padding, e.g. adding just one zero row or col to the side, rather than one on each side.  This is easily done in tensorflow and pytorch, but I see that Caffe's convolution and padding layers don't natively support this; does anybody know of a hacky workaround just to get the desired image size?  Thanks! 

赵Chris

unread,
Jul 10, 2018, 6:10:30 AM7/10/18
to Caffe Users
You can modify the caffe.proto and let the pad_h, pad_w become pad_top, pad_bottom, pad_left and pad_right, then use these params in conv layer calculations.
It's a tedious and error-prone work.


在 2018年7月10日星期二 UTC+8上午8:01:19,Josh Gruenstein写道:

Przemek D

unread,
Aug 22, 2018, 10:10:14 AM8/22/18
to Caffe Users
Give us a little while more, there's a work in progress PR which adds this exact functionality.
Reply all
Reply to author
Forward
0 new messages