Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

face this error #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

face this error #1

wants to merge 1 commit into from

Conversation

hfahad
Copy link

@hfahad hfahad commented Jul 18, 2018

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

 please help me i am facing this error
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant