當我嘗試:
normalization_layer = layers.Rescaling(1./255)
錯誤資訊:
AttributeError: module 'tensorflow.keras.layers' has no attribute 'Rescaling'
如何解決?
uj5u.com熱心網友回復:
是的,我使用了錯誤版本的 tf. 在 tf v2.70 中重新縮放,我使用了 v2.60。
將輸入值重新縮放到新范圍的預處理層。繼承自:層、模塊
tf.keras.layers.Rescaling(
scale, offset=0.0, **kwargs
)
轉載請註明出處,本文鏈接:https://www.uj5u.com/qita/385052.html
