zhenruiliao / tension

A Python package for FORCE training chaotic neural networks
MIT License
5 stars 2 forks source link

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

Open lubin-liu opened 1 year ago

lubin-liu commented 1 year ago

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.