【发布时间】:2019-09-26 11:03:01
【问题描述】:
我无法弄清楚这里发生了什么问题。安装 TensorFlow-GPU 2.0 后,以下最小示例出现问题:
import tensorflow as tf
if tf.test.is_gpu_available():
with tf.device("/gpu:0"):
tf_string_array = tf.constant(["TensorFlow", "Deep Learning", "AI"])
tf_string_array.device
执行我的代码后。我收到此错误:
RuntimeError: Can't copy Tensor with type string to device /job:localhost/replica:0/task:0/device:GPU:0.
我正在安装 tensorflow 来关注这个博客: installing-tensorflow-with-cuda-cudnn-and-gpu-support-on-windows-10
【问题讨论】:
标签: python tensorflow gpu