Open vnikoofard opened 2 years ago
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.
if symmetry_plus_result[0]==-1:
idx_min = -1
else:
min_error_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]]
# Change all resultant errors to integers
for i in range(6):
# If the element is a torch.Tensor
if type(min_error_array[i]) == torch.Tensor:
# Extract the number in the tensor as a number
min_error_array[i] = min_error_array[i].item()
#Find the minimum error
idx_min = np.argmin(np.array(min_error_array))
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?