Segmentation Fault, Pytorch on Raspberry pi 3

Hey, guys. I installed pytorch recently on Raspberry pi 3 for running SSD(single shot multibox detector) there. Here are some potential reasons (I guess) may cause the error in the title:

  1. By installation, I chose the branch 0.4.0, but installed the version 0.5.0a0+fa5d95a.

  2. I trained the model with pytorch 0.4.0 and python 2.7, but on raspberry the python version is 3.5.

Sometimes, for the first several images, it works fine but eventually the error, segmentation fault, arises.

Does anyone have any opinion about this? Appreciated in advance.

I found the solution to this myself.

Do not use torch.nn.Sequential, instead use a for loop or something else to do it.

Hi,

I also installed Pytorch 0.4.0 and I am running basic MNIST example from Pytorch’s github repo, but still facing an issue related to seg fault.

Hi, you could try increase your swap space to 4 GB. That helped me in the end and no more segment fault.

4GB swap space does’t work.