W3D2_Tutorial1: error in setting up the environment
woodwm opened this issue · 1 comments
woodwm commented
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'
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.