Closed xxyll closed 2 years ago
Hello,
Try to replace line 97 return loss
by
if mode != "test":
return loss
The variable loss was indeed undefined in the test step, thanks for pointing it out!
Thanks, The problem is solved! Hope it can also help others~
Hello, I want to discuss with you about COCO mAP results. The default value of batchsize in your code is 64, but according to the actual capacity of GPU, I set up batchsize as 8 in train step and 16 in test step. My result of mAP after training is 0.056, and after testing is 0.016, whether such results depend greatly on batchsize?
hello @xxyll, I am having an issue during training. Can you please look into #2 - Issue #2. Could you please share your environment specifications for your training? Would you be interested in connecting with me so that you can help me? You can e-mail wozkoz@protonmail.com.
I'm sorry to ask you so many questions recently, I'm embarrassed that I'm trapped by a new error again, I didn't find a solution on the net, I wonder if you have encountered it. I run
python object_detection.py -backbone vgg-11 -T 5 -tbin 2 -b 8 -epochs 50 -save_ckpt -num_workers 2
for train, then I got three eckpoint files and put the best one in ‘pretrained/vgg-11/’ as pretrained_model. Then I try to runpython object_detection.py -backbone vgg-11 -T 5 -tbin 2 -b 8 -pretrained pretrained/vgg-11/the_best.ckpt -no_train -test -num_workers 4
for test, but I get the following error.Some netizens solved "local variable 'loss' referenced before assignment" by adjusting batchsize, I tried to reduce batch_size to 2, but it didn't work. I also tried change num_workers to 0 or 2, but appeared "test dataloader 0, does not have many workers which may be a bottleneck..."