-
Notifications
You must be signed in to change notification settings - Fork 199
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
TypeError: can't convert cuda:0 device type tensor to numpy. #57
Comments
I have the same problem. Did you find a solution? |
I have the same issue. Is this an issue with the code? |
I wrote a solution (that is working for me) for this problem. Essentially, the "symmetry_plus_result" and similar calls can either return a float or a float with a torch.Tensor datatype. "np.argmin()" can only work with floats so the code below converts all the error checks from torch.Tensor datatype to numbers. Replace the whole if/else statement in S_run_aifeynman with the code below.
I'm modifying the Colab notebook from https://towardsdatascience.com/ai-feynman-2-0-learning-regression-equations-from-data-3232151bd929 to run AIF for clarity. |
Could you do a pull request with the fix? |
It got this error here. I just used .cpu() for every element and it was resolved. |
Just ran into this issue here, @Kolby-Bum 's solution solves part of the problem, there is also another line where the issue must be tackled. I think I'll submit a pull request to fix this as nothing seems to have happened since April |
Checked the other branches and current pull requests, didn't see nothing related, someone let me know if this is already being worked on and I didn't see it |
Hi,
When I ran the example code mentioned in the repository, I mean
I got the following error. What would be the reason?
The text was updated successfully, but these errors were encountered: