使用强化学习github仓库时遇到错误,请问该如何解决。
强化学习仓库链接:https://github.com/tensorlayer/tensorlayer/tree/master/examples/reinforcement_learning
遇到错误:AttributeError: module 'tensorflow' has no attribute 'contrib' when running the code after installing tensorflow-probability
核对一下各个版本的版本:
python 3.5
tensorflow >= 2.0.0 or tensorflow-gpu >= 2.0.0a0
tensorlayer >= 2.0.1
tensorflow-probability
然后使用命令:
pip install --upgrade tf-nightly-2.0-preview tfp-nightly