Li_Rong
(Li Rong)
May 16, 2018, 12:24am
1
I run neural networks example in tutorial and got segment fault as follows:
python3.5 neural_networks_tutorial.py
Net(
(conv1): Conv2d(1, 6, kernel_size=(5, 5), stride=(1, 1))
(conv2): Conv2d(6, 16, kernel_size=(5, 5), stride=(1, 1))
(fc1): Linear(in_features=400, out_features=120, bias=True)
(fc2): Linear(in_features=120, out_features=84, bias=True)
(fc3): Linear(in_features=84, out_features=10, bias=True)
)
10
torch.Size([6, 1, 5, 5])
Segmentation fault
Could anybody help me for this?
Li_Rong
(Li Rong)
May 16, 2018, 12:57am
2
running in jupyter notebook, it shows that code of defining network is OK, error occurs in the statement of feedforward as follows:
input = torch.randn(1, 1, 32, 32)
(error)---------->out = net(input)
print(out)
zyzwhdx
(joey_zhou)
May 25, 2018, 4:09pm
3
Have you solved the problem? Facing the same situation, including has no attribute ‘empty’
请问解决这个问题了吗?
SimonW
(Simon Wang)
May 25, 2018, 4:10pm
4
It might be some issue with your pytorch install. Maybe try a fresh install.
Li_Rong
(Li Rong)
May 27, 2018, 11:45pm
5
No, this problem may be concerns the installation of pytorch, my student reinstall the pytorch with python3.5 for me,
but the error appear yet, but in pytorch+python2.7, everything is ok. So I am now working at that environment.
zyzwhdx
(joey_zhou)
May 28, 2018, 12:56pm
6
Try pytorch0.4.0. You can find it in conda. I updated pytorch to 0.4.0 and the code runs very well in python3.6.