ParticleNet icon indicating copy to clipboard operation
ParticleNet copied to clipboard

Error:

Open Shreecheta opened this issue 1 year ago • 0 comments

Hi, I'm trying to run your code locally and encountered the following error :


ValueError Traceback (most recent call last) Cell In[21], line 2 1 train_dataset.shuffle() ----> 2 model.fit(train_dataset.X, train_dataset.y, 3 batch_size=batch_size, 4 # epochs=epochs, 5 epochs=1, # --- train only for 1 epoch here for demonstration --- 6 validation_data=(val_dataset.X, val_dataset.y), 7 shuffle=True, 8 callbacks=callbacks)

File /usr/local/lib/python3.8/dist-packages/keras/utils/traceback_utils.py:70, in filter_traceback..error_handler(*args, **kwargs) 67 filtered_tb = _process_traceback_frames(e.traceback) 68 # To get the full stack trace, call: 69 # tf.debugging.disable_traceback_filtering() ---> 70 raise e.with_traceback(filtered_tb) from None 71 finally: 72 del filtered_tb

File /usr/local/lib/python3.8/dist-packages/keras/utils/version_utils.py:126, in disallow_legacy_graph(cls_name, method_name) 118 if not tf.compat.v1.executing_eagerly_outside_functions(): 119 error_msg = ( 120 f"Calling {cls_name}.{method_name} in graph mode is not " 121 f"supported when the {cls_name} instance was constructed with " (...) 124 "eager mode enabled." 125 ) --> 126 raise ValueError(error_msg)

ValueError: Calling Model.fit in graph mode is not supported when the Model instance was constructed with eager mode enabled. Please construct your Model instance in graph mode or call Model.fit with eager mode enabled.

I wasn't able to find the solution. Please provide some solution.

Shreecheta avatar Jun 21 '24 09:06 Shreecheta