Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KeyError: 'The optimizer cannot recognize ... ' #33

Open
lubin-liu opened this issue Mar 19, 2023 · 0 comments
Open

KeyError: 'The optimizer cannot recognize ... ' #33

lubin-liu opened this issue Mar 19, 2023 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@lubin-liu
Copy link
Collaborator

lubin-liu commented Mar 19, 2023

With Tensorflow 2.11.0 (that is on Colab as of this writing), the following error occurs when fitting the model:

KeyError: 'The optimizer cannot recognize variable rnn_1/no_feedback_esn_1/output_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.{self.class.name}.'

It's still not clear to me what's causing this, but the workaround for now would be to install Tensorflow version 2.8.

@lubin-liu lubin-liu reopened this Mar 19, 2023
@lubin-liu lubin-liu self-assigned this Mar 20, 2023
@lubin-liu lubin-liu added the bug Something isn't working label Mar 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant