[英]Error `Cannot import name 'wrappers' from 'tensorflow.python.keras.layers'`?
[英]cannot import name 'normalization' from 'tensorflow.python.keras.layers'
我正在嘗試使用 tensorflow_rankings,但由於上述錯誤而無法導入它。 我正在使用 tensorflow 2.8.0 和 tensorflow_rankings 0.5.0,這似乎是最新的穩定版本。 它們是從中自動安裝的
pip install tensorflow
pip install tensorflow_ranking
我在 Python 3.8.10,Windows 11。
TF 2.8.0 文檔顯示 tf.keras.layers 中有一個規范化層。 錯誤似乎來自:
from tensorflow.python.keras.layers import normalization as keras_norm
在
from tensorflow_estimator.python.estimator.canned.dnn import dnn_logit_fn_builder
有什么建議嗎?
看來我的 TF 安裝已損壞。 完全卸載並重新安裝修復它。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.