SJ001/AI-Feynman

Error while running the example set

Closed this issue · 0 comments

While running the example set in python, I encounter this error during the run.

RuntimeError: Index put requires the source and destination dtypes match, got Long for the destination and Int for the source.

Here's the relevant progress and error...

NN already trained

NN loss: tensor(0.0011, grad_fn=)

Checking for symmetries...

Checking for separabilities...

Checking for compositionality...

Checking for generalized symmetry...
identify_decompositions ./example_data/ example1.txt_train
Trying (0, 1)
Traceback (most recent call last):

File "C:\Users\pauls\Documents\Python Scripts\untitled0.py", line 4, in
aifeynman.run_aifeynman("./example_data/", "example1.txt", 60, "14ops.txt", polyfit_deg=3, NN_epochs=500)

File "C:\Users\pauls\anaconda3\envs\feyn\lib\site-packages\aifeynman\S_run_aifeynman.py", line 274, in run_aifeynman
PA = run_AI_all(pathdir,filename+"_train",BF_try_time,BF_ops_file_type, polyfit_deg, NN_epochs, PA=PA)

File "C:\Users\pauls\anaconda3\envs\feyn\lib\site-packages\aifeynman\S_run_aifeynman.py", line 154, in run_AI_all
decomp_idx = identify_decompositions(pathdir,filename, model_feynman)

File "C:\Users\pauls\anaconda3\envs\feyn\lib\site-packages\aifeynman\S_gradient_decomposition.py", line 258, in identify_decompositions
all_scores = filter_decompositions_relative_scoring(X, y, model, visualize=visualize)

File "C:\Users\pauls\anaconda3\envs\feyn\lib\site-packages\aifeynman\S_gradient_decomposition.py", line 199, in filter_decompositions_relative_scoring
samples = draw_samples(X, y, model, s, NUM_SAMPLES, point=random_indices[i])

File "C:\Users\pauls\anaconda3\envs\feyn\lib\site-packages\aifeynman\S_gradient_decomposition.py", line 89, in draw_samples
pts[:, s] = idx

RuntimeError: Index put requires the source and destination dtypes match, got Long for the destination and Int for the source.