运行train.py 总是会有这样的错误,不知道该怎么解决?
- Lingua principale
- Python
- Stelle
- 620
- Fork
- 176
- Metriche di merge delle PR
- Metriche PR in attesa
Descrizione
D:\Python_Demo\GaitSet-master\model\network\triplet.py:22: UserWarning: indexing with dtype torch.uint8 is now deprecated, please use a dtype torch.bool instead. (Triggered internally at ..\aten\src\ATen/native/IndexingUtils.h:20.)
hard_hp_dist = torch.max(torch.masked_select(dist, hp_mask).view(n, m, -1), 2)[0]
D:\Python_Demo\GaitSet-master\model\network\triplet.py:23: UserWarning: indexing with dtype torch.uint8 is now deprecated, please use a dtype torch.bool instead. (Triggered internally at ..\aten\src\ATen/native/IndexingUtils.h:20.)
hard_hn_dist = torch.min(torch.masked_select(dist, hn_mask).view(n, m, -1), 2)[0]
Traceback (most recent call last):
File "D:/Python_Demo/GaitSet-master/train.py", line 21, in
m.fit()
File "D:\Python_Demo\GaitSet-master\model\model.py", line 167, in fit
) = self.triplet_loss(triplet_feature, triplet_label)
File "C:\Users\87615\Anaconda3\envs\pytorch\lib\site-packages\torch\nn\modules\module.py", line 722, in _call_impl
result = self.forward(*input, **kwargs)
File "C:\Users\87615\Anaconda3\envs\pytorch\lib\site-packages\torch\nn\parallel\data_parallel.py", line 153, in forward
return self.module(*inputs[0], **kwargs[0])
File "C:\Users\87615\Anaconda3\envs\pytorch\lib\site-packages\torch\nn\modules\module.py", line 722, in _call_impl
result = self.forward(*input, **kwargs)
File "D:\Python_Demo\GaitSet-master\model\network\triplet.py", line 23, in forward
hard_hn_dist = torch.min(torch.masked_select(dist, hn_mask).view(n, m, -1), 2)[0]
RuntimeError: cannot perform reduction function min on tensor with no elements because the operation does not have an identity
Process finished with exit code 1
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Valutazione
Questa issue non è ancora stata valutata.