【问题标题】:How do I fix a keras error for a plaidbench keras test?如何修复 plaidbench keras 测试的 keras 错误?
【发布时间】:2021-09-25 03:25:27
【问题描述】:

我正在尝试安装 plaidml-keras,以便可以在 python/jupyter 中将非 Nvidia GPU 与 Keras 一起使用。在清除了其他几个障碍后,我达到了:

plaidbench keras mobilenet

但它会出错两次

ImportError: cannot import name 'object_list_uid' from 'keras.utils.generic_utils' (/Users/me/sprinthive/src/notebooks/nbenv/lib/python3.7/site-packages/keras/utils/generic_utils.py)

File "/Users/me/sprinthive/src/notebooks/nbenv/lib/python3.7/site-packages/plaidbench/frontend_keras.py", line 321, in __init__
raise core.ExtrasNeeded(['plaidml-keras'])
plaidbench.core.ExtrasNeeded: Missing needed packages for benchmark; to fix, pip install plaidml-keras

尽管已经安装了 plaidml-keras:

pip freeze | grep plaid
plaidbench==0.6.4
plaidml==0.6.4
plaidml-keras==0.6.4

[我正在使用 0.6.4 使其在 macOS 10.13 High Sierra 上运行]

如何解决以上错误?

谢谢!

【问题讨论】:

    标签: keras plaid plaidml


    【解决方案1】:

    我通过使用 Anaconda 创建一个虚拟环境来解决这个问题。请注意,我正在使用 Windows,因此这可能不是您问题的解决方案。如果我不得不猜测,我之前安装了一些东西会导致 python 包问题。我认为这与 tensorflow 库有关,但我还没有深入研究。我建议在您的 Mac 上尝试一个全新的虚拟环境,您可以在其中安装 plaidml 包。之前的错误信息一模一样。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2017-02-18
      • 2023-04-06
      • 2020-01-10
      • 1970-01-01
      • 1970-01-01
      • 2019-12-02
      • 1970-01-01
      • 2020-02-09
      相关资源
      最近更新 更多