[英]cannot import name 'normalization' from 'tensorflow.python.keras.layers'
I am trying to use tensorflow_rankings, but cannot import it due to the above error.我正在尝试使用 tensorflow_rankings,但由于上述错误而无法导入它。 I am using tensorflow 2.8.0 and tensorflow_rankings 0.5.0, which seem to be the latest stable builds.
我正在使用 tensorflow 2.8.0 和 tensorflow_rankings 0.5.0,这似乎是最新的稳定版本。 They are what get automatically installed from
它们是从中自动安装的
pip install tensorflow
pip install tensorflow_ranking
I am on Python 3.8.10, Windows 11.我在 Python 3.8.10,Windows 11。
The TF 2.8.0 docs show there is a Normalization layer in tf.keras.layers. TF 2.8.0 文档显示 tf.keras.layers 中有一个规范化层。 The error seems to come from:
错误似乎来自:
from tensorflow.python.keras.layers import normalization as keras_norm
in在
from tensorflow_estimator.python.estimator.canned.dnn import dnn_logit_fn_builder
Any advice?有什么建议吗?
Seems my installation of TF was corrupted.看来我的 TF 安装已损坏。 A full uninstall and reinstall fixed it.
完全卸载并重新安装修复它。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.