cnn_output_size Calculation error using dilation in python api
Created by: NHZlX
The origin func in python api as follows:
def cnn_output_size(img_size, filter_size, padding, stride, caffe_mode):
output = (2 * padding + img_size - filter_size) / float(stride)
if caffe_mode:
return 1 + int(math.floor(output))
else:
return 1 + int(math.ceil(output))
This doesn't take dilation into account.