0

I am trying to install plaidml-keras so I can use non-Nvidia GPUs with Keras in python/jupyter. After clearing several other hurdles I get as far as:

plaidbench keras mobilenet

but it errors twice

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

This is in spite of already having plaidml-keras installed:

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

[I am using 0.6.4 to make it work on macOS 10.13 High Sierra]

How can I resolve the above errors?

Thanks!

4

1 回答 1

0

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

于 2021-08-07T12:13:24.730 回答