Open manjunaths opened 8 years ago
I just added an example here:
The border
argument on ConvolutionLayer
specifies how padding should be handled. The convolution sizes in this example are exactly consistent with the Caffe reference implementation:
https://github.com/BVLC/caffe/blob/master/models/bvlc_alexnet/deploy.prototxt
A BorderValid
convolution produces an output with dimensions equal to the input size minus the (kernel size - 1) in each dimension. A BorderZero
convolution will zero-pad such that the output has the same dimensions as the input.
If you want a different padding configuration, the ZeroPad
function will let you do that. This combination of manual padding and BorderValid
convolution is equivalent to BorderZero
convolution:
val c1 = ConvolutionLayer(ZeroPad(data, 5), Shape(11, 11), 96, BorderValid, lr, stride = 4, impl = Space)
Thank you for this. I will try to run this and check.
What is the best way to benchmark this AlexNet network ?
Hello, Is padding implemented in the ConvolutionLayer and other calls ?
Is there an example that demonstrates this ?
Thanks.