ShuangXieIrene / ssds.pytorch

Repository for Single Shot MultiBox Detector and its variants, implemented with pytorch, python3.
MIT License
566 stars 165 forks source link

Segmentation fault (core dumped) #50

Closed ParusMajor60 closed 4 years ago

ParusMajor60 commented 5 years ago

Hi,

I'm trying to do a test for the ssd_vgg model on VOC dataset, but I'm getting the following error :

Segmentation fault (core dumped)

I was using Python3.6 and Pytorch 0.4.1, after seeing this error I switched back to Pytorch 0.4.0. But the error is still there.

The command I run is: python test.py --cfg=./experiments/cfgs/ssd_vgg16_train_voc.yml

I have changed the corresponding directories and weights in the yml file to be those I need.

Any help would be more than appreciated. Thanks in advance!

QZ-cmd commented 4 years ago

hello,can you tell me how to solve this problem,i have a same problem... thanks

foreverYoungGitHub commented 4 years ago

@QZ-cmd @ParusMajor60 Please try the newest pytorch version (1.5) with dev branch and check whether the problem still existed. Also it is good to attach the detail log for better debugging.

QZ-cmd commented 4 years ago

@QZ-cmd @ParusMajor60 Please try the newest pytorch version (1.5) with dev branch and check whether the problem still existed. Also it is good to attach the detail log for better debugging.

Thank you for your reply,i change : images = torch.Tensor(images).to(self.device) -> images = images.to(self.device) in yolov2_test_model.py solve this problem,but I don't know what the negative impact will be,Look forward to your reply

foreverYoungGitHub commented 4 years ago

Based on the given code, the images = torch.Tensor(images).to(self.device) expect for the numpy.ndarray input and transfer it to the torch.Tensor, while images = images.to(self.device) seems already get the torch.Tensor for images. Since I'm not so sure where does the yolov2_test_model.py script come from. So not so sure about the potential issue for that script.

Btw, welcome to try the new 1.5 version for ssds.pytorch. I'm working on the document in the recent days and it is available at https://foreveryounggithub.github.io/ssds.doc/