[TIP / Pytorch] calculate convolution output shae (conv2d , pooling) (Conv 아웃풋 값
기존 계산은 다음과 같음. 하지만 pytorch에서 convolution layer output shape를 계산식은 다음과 같음 함수 def cal_conv_output_shape_torch(h_w, layer): from math import floor dilation = layer.dilation kernel_size = layer.kernel_size stride = layer.stride pad = layer.padding if type(dilation) is not tuple: pass else : dilation = dilation[0] stride = stride[0] pad = pad[0] if type(kernel_size) is not tuple: kernel_size = (kerne..
2020.10.31