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

W3D2_Tutorial1: error in setting up the environment #539

Closed
woodwm opened this issue Dec 29, 2021 · 1 comment · Fixed by #540
Closed

W3D2_Tutorial1: error in setting up the environment #539

woodwm opened this issue Dec 29, 2021 · 1 comment · Fixed by #540
Labels
Code-update Version issue and/or update code to current versions

Comments

@woodwm
Copy link

woodwm commented Dec 29, 2021

When running import tensorflow.compat.v2 as tf, an error shows

AttributeError: module 'tensorflow.python.training.experimental.mixed_precision' has no attribute '_register_wrapper_optimizer_cls'

See also: https://deeplearning.neuromatch.io/tutorials/W3D2_BasicReinforcementLearning/student/W3D2_Tutorial1.html#install-requirements

The problem is the incomparable karas installed by !pip install keras-nightly==2.5.0.dev2021020510 --quiet and this line should be deleted.

Another problem is !pip install dm-acme[tf] --quiet, it seems jax is also required when from acme import wrappers. So this should be !pip install dm-acme[jax,tensorflow] --quiet.

import tensorflow.compat.v2 as tf and tf.enable_v2_behavior() is unnecessary for the current tensorflow 2.

@spirosChv spirosChv added W3D2 Code-update Version issue and/or update code to current versions labels Jan 5, 2022
@spirosChv spirosChv mentioned this issue Jan 5, 2022
@spirosChv
Copy link
Collaborator

Thank you @woodwm . This issue is resolved in #540. Changes will be reflected in the book in approx. 2.5 hours. The updated code is now merged in main branch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Code-update Version issue and/or update code to current versions
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants