安装Anaconda和Tensorflow以及PyCharm的版本要对应一致
步骤如下:https://blog.csdn.net/cs_hnu_scw/article/details/79695347
1.注意在第4步安装Tensorflow时,需要安装python版本对应的tensorflow版本。使用安装命令:pip install tensorflow。
例如python3.5版本可以安装tensorflow1.1或是tensorflow1.2。命令可以是:pip install tensorflow==1.2。具体操作可以查看以下链接的解决方案部分https://blog.csdn.net/qq_27245699/article/details/81050035
2.安装后使用过程中可能会出现以下提示:TensorFlow library wasn't compiled to use SSE4.2 instructions, but these are available on your machine and could speed up CPU computations.
通过加入import os
os.environ['TF_CPP_MIN_LOG_LEVEL']='2'
import tensorflow as tf
可以解决警告问题。链接是:https://www.cnblogs.com/gaoss/p/7694682.html