Ssd.pytorch: Error when I training my dataset

Created on 21 Jan 2019  路  12Comments  路  Source: amdegroot/ssd.pytorch

I have error :
File "train.py", line 186, in train
loss_l, loss_c = criterion(out, targets)
File "/home/thangtran/miniconda3/lib/python3.6/site-packages/torch/nn/modules/module.py", line 477, in __call__
result = self.forward(input, *kwargs)
File "/home/thangtran/ThangTran/DungPham_Checked/ssd_voc/ssd.pytorch-master/layers/modules/multibox_loss.py", line 97, in forward
loss_c[pos] = 0 # filter out pos boxes for now
RuntimeError: copy_if failed to synchronize: device-side assert triggered
(base) thangtran@rpa:~/ThangTran/DungPham_Checked/ssd_voc/ssd.pytorch-mas
Can you help me fix it

Most helpful comment

set the 'num_classes' in config to 2. You should include the bkg class

All 12 comments

@ThorPham hello!

May I know more about your own dataset, such as the number of classes, how many labelled bboxes were created for each class, since I recently started creating a dataset but not sure how large the dataset should be if using SSD.

@lianxxx i fixed this error:
My dataset has 1 class and 2k image for training. I want to custom VGG to CNN with light weight.

@ThorPham 2k images, have you made your own dataset,, what kind of class you have ,,,human or any other object?

the loss function request more than 1 class.

@ThorPham Did you solve the issue??
If yes can you please explain the steps took to train on 1 class with your own dataset?
Thanks.

@cypherix you can make dataset same format VOC.

@ThorPham How many iterations did you train for and did it produce good accuracy??

how do you fix it?i meet the same problem

@rw1995 what is the problem?

set the 'num_classes' in config to 2. You should include the bkg class

set the 'num_classes' in config to 2. You should include the bkg class

璋㈣阿锛岃В鍐充簡鎴戠殑闂

Was this page helpful?
0 / 5 - 0 ratings

Related issues

isalirezag picture isalirezag  路  5Comments

JingpengSun picture JingpengSun  路  4Comments

isalirezag picture isalirezag  路  4Comments

FostorHUNT picture FostorHUNT  路  4Comments

xinyu1214 picture xinyu1214  路  5Comments