运行代码时:
code ops.EagerTensor(value, ctx.device_name, dtype)
它给出了一条错误消息:
return ops.EagerTensor(value, ctx.device_name, dtype)
RuntimeError: /job:localhost/replica:0/task:0/device:GPU:0 unknown device.
我还打印了 ctx.device_name 以检查给出运行时错误的原因。它多次只打印一个句子,即:
<bound method Context.device of <tensorflow.python.eager.context.Context object at
0x000002437E8F8CC8>>
有什么办法可以消除错误吗?