解決報錯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