Closed sojvai closed 7 years ago
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need the corporate CLA signed.
If you have received this in error or have any questions, please contact us at cla@fb.com. Thanks!
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!
Could you try
idx = torch.from_numpy(permutation[i:i + self.batch_size]).long().cuda()
instead and let me know if that fixes the issue? I think it would make more sense to use the "from_numpy" function here.
Yeah. That worked!
@aconneau updated the PR based on your suggestion.
Thanks! There may be other lines like this that are not pytorch 0.2 compatible. I'll merge your pull request and track the rest myself.
fix issue #9
It seems cuda tensor doesn't accept numpy array as a parameter. convert it to python list worked.