haochenheheda / NFormer

Implementation of NFormer: Robust Person Re-identification with Neighbor Transformer
MIT License
65 stars 11 forks source link

Error #12

Open qJyya opened 1 year ago

qJyya commented 1 year ago

File "/media/data4/qiujy/anaconda3/envs/pytorch/lib/python3.9/site-packages/ignite/engine/engine.py", line 291, in _handle_exception raise e File "/media/data4/qiujy/anaconda3/envs/pytorch/lib/python3.9/site-packages/ignite/engine/engine.py", line 272, in _run_once_on_dataset self.state.output = self._process_function(self, batch) File "/media/data4/qiujy/reid/NFormer/./engine/trainer.py", line 119, in _update loss = nformer_loss_fn(score, feat, target) File "/media/data4/qiujy/reid/NFormer/./layers/init.py", line 96, in loss_func return xent(score, target) + \ File "/media/data4/qiujy/anaconda3/envs/pytorch/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1190, in _call_impl return forward_call(*input, **kwargs) File "/media/data4/qiujy/reid/NFormer/./layers/triplet_loss.py", line 147, in forward targets = torch.zeros(logprobs.size()).scatter(1, targets.unsqueeze(1).data.cpu(), 1) RuntimeError: index 774 is out of bounds for dimension 1 with size 751