pinery-sls / Pytorch_Yolor_DeepSort

Yolor and DeepSort
10 stars 4 forks source link

SyncBatchNorm expected input tensor to be on GPU #3

Open TadaasCirk opened 2 years ago

TadaasCirk commented 2 years ago

Hi, I get the following error when trying to run track.py any idea how I can solve it?

Traceback (most recent call last):
  File "track.py", line 228, in <module>
    detect(args)
  File "track.py", line 104, in detect
    pred = model(img, augment=opt.augment)[0]
  File "C:\Users\33826\Anaconda3\envs\yolor\lib\site-packages\torch\nn\modules\module.py", line 1110, in _call_impl
    return forward_call(*input, **kwargs)
  File "C:\Users\33826\YOLO\Pytorch_Yolor_DeepSort\./yolor\models\yolo.py", line 177, in forward
    return self.forward_once(x, profile)  # single-scale inference, train
  File "C:\Users\33826\YOLO\Pytorch_Yolor_DeepSort\./yolor\models\yolo.py", line 193, in forward_once
    x = m(x)  # run
  File "C:\Users\33826\Anaconda3\envs\yolor\lib\site-packages\torch\nn\modules\module.py", line 1110, in _call_impl
    return forward_call(*input, **kwargs)
  File "C:\Users\33826\YOLO\Pytorch_Yolor_DeepSort\./yolor\models\common.py", line 181, in forward
    return self.cv4(self.act(self.bn(torch.cat((y1, y2), dim=1))))
  File "C:\Users\33826\Anaconda3\envs\yolor\lib\site-packages\torch\nn\modules\module.py", line 1110, in _call_impl
    return forward_call(*input, **kwargs)
  File "C:\Users\33826\Anaconda3\envs\yolor\lib\site-packages\torch\nn\modules\batchnorm.py", line 682, in forward
    raise ValueError("SyncBatchNorm expected input tensor to be on GPU")
ValueError: SyncBatchNorm expected input tensor to be on GPU
jgomeher83 commented 2 years ago

can you solved?