我试图运行基于Keras / TensorFlow的机器学习代码。在tensorflow
环境中运行时,遇到以下错误:
from keras_applications.mobilenet import relu6
ImportError: cannot import name 'relu6'
我该如何解决?
最佳答案
请参阅GitHub上的answer。
您需要使用CustomObjectScope
导入relu6
。
我试图运行基于Keras / TensorFlow的机器学习代码。在tensorflow
环境中运行时,遇到以下错误:
from keras_applications.mobilenet import relu6
ImportError: cannot import name 'relu6'
最佳答案
请参阅GitHub上的answer。
您需要使用CustomObjectScope
导入relu6
。