【问题标题】:How to remove the following error : ImportError: cannot import name 'normalize_data_format'如何删除以下错误:ImportError: cannot import name 'normalize_data_format'
【发布时间】:2021-05-10 18:16:27
【问题描述】:

您可以通过 google colab 链接看到以下代码的顺序错误: https://colab.research.google.com/drive/1Tc8WEzqBMRd0Eg7pJijI98eBEKTw45s3?usp=sharing

如果您看不到代码,您可以从 GitHub 获取代码:https://github.com/nephashi/GaitRecognitionCNN

如何解决?

我收到以下错误:

2021-02-06 17:03:14.551645: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] 成功打开动态库 libcudart.so.10.1 回溯(最近一次通话最后): 文件“/content/sample_data/GaitRecognitionCNN-master/main.py”,第 5 行,在 从图层.Conv2D121 导入 Conv2D121 文件“/content/sample_data/GaitRecognitionCNN-master/layers/Conv2D121.py”,第 13 行,在 从 keras.utils.conv_utils 导入 normalize_data_format ImportError: 无法导入名称“normalize_data_format”

如果我以某种方式解决了它出现的下一个错误,那么互联网上存在的所有解决方案都会变旧,而 keras 和 tensorflow 库已被更改,因此这些解决方案并不总是有效。

如果遇到问题,请解决所有下一个错误,我将非常感谢你,谢谢

【问题讨论】:

    标签: python tensorflow keras


    【解决方案1】:

    替换导入语句来自

    from keras.utils import conv_utils
    

    from tensorflow.python.keras.utils import conv_utils
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2011-01-22
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-07-07
      • 2013-02-25
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多