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

AttributeError: BasicLSTMCell is not available with Keras 3. #2876

Open
mr-lhn opened this issue Jan 3, 2025 · 0 comments
Open

AttributeError: BasicLSTMCell is not available with Keras 3. #2876

mr-lhn opened this issue Jan 3, 2025 · 0 comments

Comments

@mr-lhn
Copy link

mr-lhn commented Jan 3, 2025

WARNING:tensorflow:From C:\Users\11223\AppData\Local\Programs\Python\Python312\Lib\site-packages\tensorflow\python\compat\v2_compat.py:98: disable_resource_variables (from tensorflow.python.ops.resource_variables_toggle) is deprecated and will be removed in a future version.
Instructions for updating:
non-resource variables are not supported in the long term
Traceback (most recent call last):
File "C:\Users\11223\Desktop\main.py", line 498, in
ue_RL_list.append(DuelingDoubleDeepQNetwork(env.n_actions, env.n_features, env.n_lstm_state, env.n_time,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
line 54, in init
self._build_net()
line 150, in _build_net
self.q_eval = build_layers(self.s, self.lstm_s, c_names, n_l1, n_lstm, w_initializer, b_initializer)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
, line 86, in build_layers
lstm_dnn = tf.compat.v1.nn.rnn_cell.BasicLSTMCell(n_lstm)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\11223\AppData\Local\Programs\Python\Python312\Lib\site-packages\tensorflow\python\util\lazy_loader.py", line 207, in getattr
raise AttributeError(
AttributeError: BasicLSTMCell is not available with Keras 3.

Do I need to roll back a version?

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

No branches or pull requests

1 participant