Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
i am facing this error can you please help me ???
RuntimeError Traceback (most recent call last)
in ()
----> 1 net = SegResNet(num_classes, pretrained_net)
/media/hfahad/a7382dc9-2057-4d75-a274-f10dded99b19/OBJECT RECOGNATION/project/pytorch_fcn/model.py in init(self, num_classes, pretrained_net)
54 self.pretrained_net = pretrained_net
55 self.relu = nn.ReLU(inplace=True)
---> 56 self.conv5 = conv(512,256, stride=2, transposed=True)
57 self.bn5 = bn(256)
58 self.conv6 = conv(256,128, stride=2, transposed=True)
/media/hfahad/a7382dc9-2057-4d75-a274-f10dded99b19/OBJECT RECOGNATION/project/pytorch_fcn/model.py in conv(in_planes, out_planes, kernel_size, stride, dilation, bias, transposed)
15 for x in range(kernel_size):
16 w[y, x] = (1 - abs((x - centre) / stride)) * (1 - abs((y - centre) / stride))
---> 17 layer.weight.data.copy_(w.div(in_planes).repeat(out_planes, in_planes, 1, 1))
18 else:
19 padding = (kernel_size + 2 * (dilation - 1)) // 2
RuntimeError: The expanded size of the tensor (256) must match the existing size (512) at non-singleton dimension 1