我已经尝试了十几次来安装tensorflow-GPU,但都失败了,尽管我遵循了那些成功安装的人的指示。我刚刚注意到我有2个GPU指示器,这意味着我有2个GUP设置?一个英特尔和一个英伟达。
会不会是这个原因?如果是这样的话,我怎么才能找到合适的(Nvidia)?谢谢你的建议。

发布于 2019-10-24 17:51:41
通过以下步骤验证tensorflow-GPU安装是否正确。
import tensorflow as tf print(tf.test.is_gpu_available())
sess = tf.Session(config=tf.ConfigProto(log_device_placement=True))
使用nvidia-smi import tensorflow as tf with tf.device('/gpu:0'): a = tf.constant([1.0, 2.0, 3.0, 4.0, 5.0, 6.0], shape=[2, 3], name='a') b = tf.constant([1.0, 2.0, 3.0, 4.0, 5.0, 6.0], shape=[3, 2], name='b') c = tf.matmul(a, b) with tf.Session() as sess: print (sess.run(c))
https://stackoverflow.com/questions/57894221
复制相似问题