【TensorFlow】安装与自测
-
安装TensorFlow
conda search tensorflow-gpu conda install tensorflow-gpu
-
测试TensorFlow是否安装成功
python -c "import tensorflow as tf; print(tf.reduce_sum(tf.random.normal([1000, 1000])))"
tensorflow 1.0版本的代码要创建会话
Session
需要注意的是:tensorflow的代码默认会占用所有显卡的所有显存 -
TensorFlow按需分配显存
参考链接:tensorflow 使用 cpu 而不使用 gpu 问题 - 万道一 - 博客园 (cnblogs.com) -
[Update] Tensorflow安装