CCNet icon indicating copy to clipboard operation
CCNet copied to clipboard

Segmentation fault

Open Kenneth-X opened this issue 5 years ago • 0 comments

my pytorch 0.4.1 with cuda 9.0 and i use voc dataset, the image can be read correctly , but got some problem in forward

i debug the code :

def forward(self, x, recurrence=1):
    x = self.relu1(self.bn1(self.conv1(x)))
    x = self.relu2(self.bn2(self.conv2(x)))
    x = self.relu3(self.bn3(self.conv3(x)))
    x = self.maxpool(x)
    x = self.layer1(x)
    x = self.layer2(x)
    x = self.layer3(x)
    print('self.layer3:', x.shape)
    x_dsn = self.dsn(x)
    print('self.dsn:', x.shape)
    x = self.layer4(x)
    x = self.head(x, recurrence)
    return [x, x_dsn]

the output is followed:

xxxxxxxxxxxxx (bottleneck): Sequential( (0): Conv2d(2560, 512, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False) (1): InPlaceABNSync(512, eps=1e-05, momentum=0.1, affine=True, devices=[0], activation=leaky_relu slope=0.01) (2): Dropout2d(p=0.1) (3): Conv2d(512, 21, kernel_size=(1, 1), stride=(1, 1)) ) ) (dsn): Sequential( (0): Conv2d(1024, 512, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1)) (1): InPlaceABNSync(512, eps=1e-05, momentum=0.1, affine=True, devices=[0], activation=leaky_relu slope=0.01) (2): Dropout2d(p=0.1) (3): Conv2d(512, 21, kernel_size=(1, 1), stride=(1, 1)) ) ) /home/yuxi.xt/software/anaconda3/lib/python3.6/site-packages/torch/nn/functional.py:52: UserWarning: size_average and reduce args will be deprecated, please use reduction='elementwise_mean' instead. warnings.warn(warning.format(ret)) self.layer3: torch.Size([4, 1024, 97, 97]) Segmentation fault

it means : x_dsn = self.dsn(x) can not be processed

how can i solve it ?

Kenneth-X avatar Feb 12 '20 02:02 Kenneth-X