2020-06-06

2020-06-06  本文已影响0人  小醇仔

@[TOC](module 'tensorflow' has no attribute 'xxxx'解决办法)

module 'tensorflow' has no attribute 'xxxx'解决办法

当你安装TensorFlow时候,出现module 'tensorflow' has no attribute 'xxxx'

是你代码用的TensorFlow1.0版本,而编译时候用的TensorFlow2.0版本

解决办法:
1卸载TensorFlow2.0版本

pip uninstall tensorflow

2安装TensorFlow1.0版本
(首选清华大学镜像安装,速度快)

pip3 install tensorflow==1.3.0 -i https://pypi.tuna.tsinghua.edu.cn/simple/
上一篇 下一篇

猜你喜欢

热点阅读