出現RuntimeError: Expected object of device type cuda but got device type cpu for argument #2 'other' in call to _th_min錯誤
1.把Build SSD_VGG.ipynb 的 Use_cuda = True後,程式跑到 loss_l,loss_c = criterion(out,y ) 時,
出現 RuntimeError: Expected object of device type cuda but got device type cpu for argument #2 'other' in call to _th_min
2.我確認 torch.cuda.is_available() 是返回 True,請問這是哪裡有問題 ? 還要做哪些 check 動作 ?
===========================================
RuntimeError Traceback (most recent call last)
<ipython-input-15-de7e25ab935e> in <module>
18 out = net(image_)
19 '''Regression Loss and Classification Loss'''
---> 20 loss_l,loss_c = criterion(out,y )
RuntimeError: Expected object of device type cuda but got device type cpu for argument #2 'other' in call to _th_min