对于convolution:
output = (input + 2 * p - k) / s + 1;
对于deconvolution:
output = (input - 1) * s + k - 2 * p;
其中,input为输入维度,s为stride;k为kernel_size;p表示pad,默认为0.
对于convolution:
output = (input + 2 * p - k) / s + 1;
对于deconvolution:
output = (input - 1) * s + k - 2 * p;
其中,input为输入维度,s为stride;k为kernel_size;p表示pad,默认为0.