SphereFace-pytorch icon indicating copy to clipboard operation
SphereFace-pytorch copied to clipboard

IndexError: Dimension out of range (expected to be in range of [-1, 0], but got 1)

Open TTTJJJWWW opened this issue 5 years ago • 0 comments

Hi! @Joyako when i use a-softmax in my codes, i get errors as follow: File "train.py", line 276, in <module> train() File "train.py", line 174, in train loss = criterion(scores, labels) File "/home/iie/.conda/envs/lib/python3.7/site-packages/torch/nn/modules/module.py", line 547, in __call__ result = self.forward(*input, **kwargs) File "/home/iie/loss.py", line 25, in forward index.scatter_(1, target.data.view(-1, 1), 1) IndexError: Dimension out of range (expected to be in range of [-1, 0], but got 1) how can i fix this?

TTTJJJWWW avatar Nov 06 '19 14:11 TTTJJJWWW