pytorch-YOLO-v1
pytorch-YOLO-v1 copied to clipboard
prediction problem
when i tried to predict this error occurred
load model...
predicting...
predict.py:143: UserWarning: volatile was removed and now has no effect. Use with torch.no_grad():
instead.
img = Variable(img[None,:,:,:],volatile=True)
D:\miniconda\lib\site-packages\torch\nn\functional.py:1332: UserWarning: nn.functional.sigmoid is deprecated. Use torch.sigmoid instead.
warnings.warn("nn.functional.sigmoid is deprecated. Use torch.sigmoid instead.")
Traceback (most recent call last):
File "predict.py", line 174, in
please guide thank you
Hi,I met the same problem,have you solve it?
@JianJiaCheng Try to use torch.stack()
instead.
@vcvishal @JianJiaCheng add: cls_indexs = [item.unsqueeze(0) for item in cls_indexs] before : cls_indexs = torch.cat(cls_indexs,0)