Add support for non-zero padding#438
Conversation
| kernel_size, | ||
| strides=1, | ||
| padding="valid", | ||
| pad_values=0.0, |
There was a problem hiding this comment.
@larq/core how do you feel about pad_values vs padding_values?
There was a problem hiding this comment.
I'm fine with either, no particular preference.
leonoverweel
left a comment
There was a problem hiding this comment.
From an initial look this LGTM, but given how complex it is I think another few sets of eyes would be useful. CC @Tombana, given your experience with padding, can you take a look?
a1f1522 to
2057892
Compare
Tombana
left a comment
There was a problem hiding this comment.
Looks good to me. I'd say pad_value (singular) makes slightly more sense but since the tf op also uses it in plural form I think this is good.
2057892 to
c00da9b
Compare
koenhelwegen
left a comment
There was a problem hiding this comment.
Looks good! Only thing is I would prefer to test whether the layer actually uses non-zero padding (if I'm correct the test would now pass even if _is_native_padding() always returns True)
Good point. I added a check to make sure |
This adds support for non zero padding for
QuantConv1D,QuantConv2D,QuantConv3D,QuantDepthwiseConv2D,QuantSeparableConv1DandQuantSeparableConv2Din order to better support larq/compute-engine#252We can add support for locally connected layers and transposed convolutions in the future.