We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
out_selected_a = Variable(torch.from_numpy(out_a.cpu().data.numpy()[hard_triplets]).cuda()) out_selected_p = Variable(torch.from_numpy(out_p.cpu().data.numpy()[hard_triplets]).cuda()) out_selected_n = Variable(torch.from_numpy(out_n.cpu().data.numpy()[hard_triplets]).cuda())
will lead to
RuntimeError: element 0 of tensors does not require grad and does not have a grad_fn
why not use:
out_selected_a = out_a[hard_triplets] out_selected_p = out_p[hard_triplets] out_selected_n = out_n[hard_triplets]
The text was updated successfully, but these errors were encountered:
No branches or pull requests
will lead to
why not use:
The text was updated successfully, but these errors were encountered: