Tensorflow的安装
-
环境
- windows10
- Anaconda3
-
安装Tensorflow
- 打开Anaconda Prompt输入
conda install tensorflow-gpu- 或者cmd
python -m pip install tensorflow-gpu -
下载并安装CUDA
-
测试以及报错
- 然后尝试用cmd输入
python import tensorflow as tf![]()
- 然后很大可能会出现如下的报错
lib\site-packages\h5py\__init__.py:36: FutureWarning: Conversion of the second argument of issubdtype from `float` to `np.floating` is deprecated. In future, it will be treated as `np.float64 == np.dtype(float).type `. from ._conv import register_converters as _register_convertersSolution:
可以参考以下两个博客 1.https://blog.csdn.net/qq_41185868/article/details/80276847?utm_source=copy
2.https://blog.csdn.net/guangli_r/article/details/80860406如果还有其他报错的话可以去Tensorflow官网查看解决办法
最后验证一下安装效果:
```
python
import tensorflow as tf
tf.enable_eager_execution();
print(tf.reduce_sum(tf.random_normal([1000, 1000])));
```
结果:






浙公网安备 33010602011771号