Skip to content
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

Error: 'int' object has no attribute 'cpu' #74

Open
yecyn opened this issue Oct 24, 2022 · 1 comment
Open

Error: 'int' object has no attribute 'cpu' #74

yecyn opened this issue Oct 24, 2022 · 1 comment

Comments

@yecyn
Copy link

yecyn commented Oct 24, 2022

Hello,

I run into the following errors when I was trying my own dataset, and I was wondering if someone would please help me figure out the problem. Thank you so much!

Here's the errors:


AttributeError Traceback (most recent call last)
in
2 # Run Bass Example as the regression dataset
3 #run_aifeynman("/content/gdrive/MyDrive/AI-Feynman-1/","LinearDemandExample.txt",30,"14ops.txt", polyfit_deg=3, NN_epochs=400)
----> 4 run_aifeynman("/content/AI-Feynman/","Movie_21_Jump_Street.txt",30,"14ops.txt", polyfit_deg=3, NN_epochs=400)
5 get_ipython().system('cat /content/AI-Feynman/results/solution_Movie_21_Jump_Street.txt')
6 #!cat /content/gdrive/MyDrive/AI-Feynman-1/results/solution_LinearDemandExample.txt

1 frames
/content/AI-Feynman/aifeynman/S_run_aifeynman.py in run_aifeynman(pathdir, filename, BF_try_time, BF_ops_file_type, polyfit_deg, NN_epochs, vars_name, test_percentage)
271 PA = ParetoSet()
272 # Run the code on the train data
--> 273 PA = run_AI_all(pathdir,filename+"_train",BF_try_time,BF_ops_file_type, polyfit_deg, NN_epochs, PA=PA)
274 PA_list = PA.get_pareto_points()
275

/content/AI-Feynman/aifeynman/S_run_aifeynman.py in run_AI_all(pathdir, filename, BF_try_time, BF_ops_file_type, polyfit_deg, NN_epochs, PA)
94 idx_min = -1
95 else:
---> 96 idx_min = np.argmin(np.array([symmetry_plus_result[0], symmetry_minus_result[0], symmetry_multiply_result[0], symmetry_divide_result[0], separability_plus_result[0], separability_multiply_result[0]]))
97 print("")
98 # Check if compositionality is better than the best so far

AttributeError: 'int' object has no attribute 'cpu'

@maxiimilian
Copy link

This seems to be the same problem as #57. You can try and manually apply the fix presented in #75. Just check the "Files changed" tab to see which file to modify where.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants