我试图运行基于Keras / TensorFlow的机器学习代码。在tensorflow环境中运行时,遇到以下错误:

from keras_applications.mobilenet import relu6
ImportError: cannot import name 'relu6'


我该如何解决?

最佳答案

请参阅GitHub上的answer

您需要使用CustomObjectScope导入relu6

08-25 00:11