KordingLab / Neural_Decoding

A python package that includes many methods for decoding neural activity
BSD 3-Clause "New" or "Revised" License
412 stars 117 forks source link

Graph execution error: Detected at node 'Adam/StatefulPartitionedCall_2' #17

Closed rollwan closed 10 months ago

rollwan commented 10 months ago

When I fitting DNN model in Examples_decoders_hc.ipynb, it come a error below:

FailedPreconditionError Traceback (most recent call last) Input In [93], in <cell line: 5>() 2 model_dnn=DenseNNDecoder(units=100,dropout=0.25,num_epochs=10) 4 #Fit model ----> 5 model_dnn.fit(X_flat_train,y_train) 7 #Get predictions 8 y_valid_predicted_dnn=model_dnn.predict(X_flat_valid)

File ~/.local/lib/python3.8/site-packages/Neural_Decoding/decoders.py:396, in DenseNNRegression.fit(self, X_flat_train, y_train) 394 model.fit(X_flat_train,y_train,nb_epoch=self.num_epochs,verbose=self.verbose) #Fit the model 395 else: --> 396 model.fit(X_flat_train,y_train,epochs=self.num_epochs,verbose=self.verbose) #Fit the model 397 self.model=model

File ~/.local/lib/python3.8/site-packages/keras/src/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 ~/.local/lib/python3.8/site-packages/tensorflow/python/eager/execute.py:53, in quick_execute(op_name, num_outputs, inputs, attrs, ctx, name) 51 try: 52 ctx.ensure_initialized() ---> 53 tensors = pywrap_tfe.TFE_Py_Execute(ctx._handle, device_name, op_name, 54 inputs, attrs, num_outputs) 55 except core._NotOkStatusException as e: 56 if name is not None:

FailedPreconditionError: Graph execution error:

Detected at node 'Adam/StatefulPartitionedCall_2' defined at (most recent call last): File "/usr/lib/python3.8/runpy.py", line 194, in _run_module_as_main return _run_code(code, main_globals, None, File "/usr/lib/python3.8/runpy.py", line 87, in _run_code exec(code, run_globals)