YOLO_v3_tutorial_from_scratch
YOLO_v3_tutorial_from_scratch copied to clipboard
error when testing forward pass
when I test forward pass ,I got such error:
Traceback (most recent call last):
File "darknet_debug.py", line 317, in
Hi @Anikily ,
Maybe you can debug value of x["anchors"] first.
E.g. my case would be this:
x["anchors"] = '10,13, 16,30, 33,23, 30,61, 62,45, 59,119, 116,90, 156,198, 373,326'
which is come from https://github.com/ayooshkathuria/YOLO_v3_tutorial_from_scratch/blob/master/cfg/yolov3.cfg
os: macos
thanks ,I have solved this problem, and I encountered another problem :
Traceback (most recent call last):
File "darknet.py", line 238, in
HI @Anikily , I can reproduce the error you encountered on my PC (os: windows10, cuda: available). Then I do the debug, where x_y_offset.is_cuda = True, but prediction.is_cuda = False.
So I think you might be right, one in GPU but the other in CPU. Then I added few lines in darknet.py (just pick somewhere looks suitable ...) so that prediction.is_cuda can be True later.
# Transform
x = x.data
if CUDA:
x = x.cuda()
Now it pass with exit code 0.
But I still not sure where is a good place to put x = x.cuda() ...
Hi @arashilen , thansks for your reply.I have solved this problem yesterday in a similar way to yours.And I did this step in util.py...in just ablove the line which reported the error.