Closed noobliang closed 5 years ago
why a tensor [2,16,104,485] , by Downsampleblock , some to be [2,48,52,243]. some to be [2,16,52,242] ,can't torch.cat ?
output = torch.cat([self.conv(input), self.pool(input)], 1) . RuntimeError: invalid argument 0: Sizes of tensors must match except in dimension 1. Got 242 and 243 in dimension 3 at /pytorch/torch/lib/THC/generic/THCTensorMath.cu:111
torch.Size([2, 48, 52, 243]), torch.Size([2, 16, 52, 242])
sorrry , i found my image height has problem
为什么由Downsampleblock提供的张量[2,16,104,485],有些为[2,48,52,243]。有些是[2,16,52,242],可以不使用torch.cat吗?
output = torch.cat([self.conv(input), self.pool(input)], 1) . RuntimeError: invalid argument 0: Sizes of tensors must match except in dimension 1. Got 242 and 243 in dimension 3 at /pytorch/torch/lib/THC/generic/THCTensorMath.cu:111
torch.Size([2, 48, 52, 243]), torch.Size([2, 16, 52, 242])
抱歉,我发现我的图像高度有问题
I have the same question ,I should change the input image's size ?
@noobliang
How do you resolve this issue? I got the same problem. What is image height I need to use?
Thanks,
why a tensor [2,16,104,485] , by Downsampleblock , some to be [2,48,52,243]. some to be [2,16,52,242] ,can't torch.cat ?
output = torch.cat([self.conv(input), self.pool(input)], 1) . RuntimeError: invalid argument 0: Sizes of tensors must match except in dimension 1. Got 242 and 243 in dimension 3 at /pytorch/torch/lib/THC/generic/THCTensorMath.cu:111
torch.Size([2, 48, 52, 243]), torch.Size([2, 16, 52, 242])