keras ImportError: cannot import name 'get_source_inputs'

网友投稿 1287 2022-11-08

keras ImportError: cannot import name 'get_source_inputs'

keras ImportError: cannot import name 'get_source_inputs'

今天在运行efficientnet程序的时候,出现了下面的错误:

from ._conv import register_converters as _register_convertersUsing TensorFlow backend.Traceback (most recent call last): File "run.py", line 10, in import BuildModel_basic File "/home/eric/Documents/Experiments/violence_detection/ViolenceDetection_CNNLSTM/BuildModel_basic.py", line 19, in from keras_efficientnets import EfficientNetB0 File "/home/eric/anaconda3/lib/python3.6/site-packages/keras_efficientnets/__init__.py", line 1, in from keras_efficientnets.efficientnet import * File "/home/eric/anaconda3/lib/python3.6/site-packages/keras_efficientnets/efficientnet.py", line 26, in from keras.utils import get_file, get_source_inputsImportError: cannot import name 'get_source_inputs'

解决方法

pip install keras==2.2.4

参考文献

[1].EfficientNets in Keras. ​​model to tensorflow.keras. ​​https://stackoverflow.com/questions/51843541/keras-model-to-tensorflow-keras​​

版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。

上一篇:ubuntu 18.04 安装 nvidia drivers 430安装
下一篇:python3 torch-baidu-ctc安装
相关文章

 发表评论

暂时没有评论,来抢沙发吧~