問題描述:
使用tf 1.14.0 如下模塊報錯:
train_loss = tf.keras.metrics.Mean('train_loss', dtype=tf.float32)
AttributeError: module 'tensorflow._api.v1.keras.metrics' has no attribute 'Mean'
問題解決:
更新tf即可:
pip install -U tensorflow
使用tf 1.14.0 如下模塊報錯:
train_loss = tf.keras.metrics.Mean('train_loss', dtype=tf.float32)
AttributeError: module 'tensorflow._api.v1.keras.metrics' has no attribute 'Mean'
更新tf即可:
pip install -U tensorflow
本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。