tensorflow错误:InvalidArgumentError (see above for traceback): Cannot assign a device for operation

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/yql_617540298/article/details/85622337

一、错误

InvalidArgumentError (see above for traceback): Cannot assign a device for operation 'shuffle_batch': Could not satisfy explicit device specification '/device:GPU:0' because no supported kernel for GPU devices is available.

二、解决

链接:https://github.com/tensorflow/tensorflow/issues/2285

改变tf.ConfigProto()的参数:

with tf.Session(config=tf.ConfigProto(gpu_options=gpu_options, allow_soft_placement=True)) as sess:

猜你喜欢

转载自blog.csdn.net/yql_617540298/article/details/85622337
今日推荐