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

Paths to DropoutRNNCellMixin and BaseRandomLayer not found (keras-lmu 0.7.0) #57

Open
flacle opened this issue Jun 15, 2024 · 1 comment

Comments

@flacle
Copy link

flacle commented Jun 15, 2024

This is likely due to Keras version changes. Currently using Keras 3.2.1 with Tensorflow 2.16.1.

So far, I've changed the following in layers.py:

from keras.src.layers.rnn.dropout_rnn_cell_mixin import DropoutRNNCellMixin
to:
from tensorflow.python.keras.layers.recurrent import DropoutRNNCellMixin

and:
from keras.src.engine.base_layer import BaseRandomLayer
to:
from tensorflow.keras.layers import Layer as BaseRandomLayer

and:
training = tf.keras.backend.learning_phase()
to:
training = True

@drasmuss
Copy link
Member

If you install the current development version from the main branch it should be compatible with tensorflow 2.16. We'll do a release with those updates soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants