解决报错Could not satisfy explicit device specification '' because the node was colocated with a group of nodes that required incompatible device '/device:GPU:0'



sess = tf.Session(config=tf.ConfigProto(log_device_placement=True))

改为如下:
sess = tf.Session(config=tf.ConfigProto(allow_soft_placement=True, log_device_placement=True))

备注:allow_soft_placement=True表示当没有GPU实现可用时,使用将允许TensorFlow回退到CPU。


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM