-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
help me to resolve this error #31
Comments
what you change? Please make it clearer. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
triplwtloss is giving dimension error. Please help me to fix this error.
File "main.py", line 50, in train
loss = self.loss(outputs, labels)
File "/usr/local/lib/python3.7/dist-packages/torch/nn/modules/module.py", line 889, in _call_impl
result = self.forward(*input, **kwargs)
File "/content/STREID/loss.py", line 14, in forward
Triplet_Loss = [triplet_loss(output, labels) for output in outputs[1:4]]
File "/content/STREID/loss.py", line 14, in
Triplet_Loss = [triplet_loss(output, labels) for output in outputs[1:4]]
File "/usr/local/lib/python3.7/dist-packages/torch/nn/modules/module.py", line 889, in _call_impl
result = self.forward(*input, **kwargs)
File "/content/STREID/loss.py", line 57, in forward
dist = torch.pow(inputs, 2).sum(dim=1, keepdim=True).expand(n, n)
IndexError: Dimension out of range (expected to be in range of [-1, 0], but got 1)
The text was updated successfully, but these errors were encountered: