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。
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刪除。