You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
13 frames /usr/local/lib/python3.10/dist-packages/keras/optimizers/optimizer.py in _update_step(self, gradient, variable)
230 return
231 if self._var_key(variable) not in self._index_dict:
--> 232 raise KeyError(
233 f"The optimizer cannot recognize variable {variable.name}. "
234 "This usually means you are trying to call the optimizer to "
KeyError: in user code:
File "/usr/local/lib/python3.10/dist-packages/keras/optimizers/optimizer.py", line 224, in _update_step_xla *
return self._update_step(gradient, variable)
File "/usr/local/lib/python3.10/dist-packages/keras/optimizers/optimizer.py", line 232, in _update_step **
raise KeyError(
KeyError: 'The optimizer cannot recognize variable dense_4/kernel:0. This usually means you are trying to call the optimizer to update different parts of the model separately. Please call `optimizer.build(variables)` with the full list of trainable variables before the training loop or use legacy optimizer `tf.keras.optimizers.legacy.Adam.'
The text was updated successfully, but these errors were encountered:
When I run code on colab, I always get errors when running the continuous idenfication and discrete identification modules:
None
—— Starting Adam optimization ——
KeyError Traceback (most recent call last)
in <cell line: 40>()
38 layers[-1] = q
39 pinn = PhysicsInformedNN(layers, tf_optimizer, logger, dt, lb, ub, q, IRK_alpha, IRK_beta)
---> 40 pinn.fit(x_0, u_0, x_1, u_1, tf_epochs)
41 U_0_pred, U_1_pred = pinn.predict(x_star)
42 lambda_1_pred_noisy, lambda_2_pred_noisy = pinn.get_params(numpy=True)
13 frames
/usr/local/lib/python3.10/dist-packages/keras/optimizers/optimizer.py in _update_step(self, gradient, variable)
230 return
231 if self._var_key(variable) not in self._index_dict:
--> 232 raise KeyError(
233 f"The optimizer cannot recognize variable {variable.name}. "
234 "This usually means you are trying to call the optimizer to "
KeyError: in user code:
The text was updated successfully, but these errors were encountered: