分类: TensorFlow undefined 1. 已经安装cuda但是tensorflow仍然使用cpu加速的问题 电脑上同时安装了GPU和CPU版本的TensorFlow,本来想用下面代码测试一下GPU程序,但无奈老是没有调用GPU。 1 2 3 4 5 6 7 8 9 10 11 12 13 14 import tensorflow as tf with tf.device('/cpu:0'): a = tf.constant ([...
(1)tensorflow没有安装成功,这样的话,就需要重新按照我的步骤去了! (2)在windows平台下安装完Aanconda后,在prompt中activate tensorflow, import tensorflow ,执行其他各种测试均ok,但是打开spyder,执行import tensorflow,时,提示没有tensorflow模块,最后发现是因为spyde没有安装在tensorflow目录下(安装anaconda时spyde是默...
1. 已经安装cuda但是tensorflow仍然使用cpu加速的问题 电脑上同时安装了GPU和CPU版本的TensorFlow,本来想用下面代码测试一下GPU程序,但无奈老是没有调用GPU。 1 2 3 4 5 6 7 8 9 10 11 12 13 14 import tensorflow as tf with tf.device('/cpu:0'): a = tf.constant ([1.0, 2.0, 3.0], shape=[...