ImportError: 无法从’keras.models’导入’name’ ‘Input’

huangapple go评论61阅读模式
英文:

ImportError: cannot import name 'Input' from 'keras.models'

问题

ImportError Traceback (most recent call last)
in cell 12
ImportError: cannot import name 'Input' from 'keras.models' (C:\Users\91626\AppData\Roaming\Python\Python39\site-packages\keras\models_init_.py)

英文:

please open imageImportError Traceback (most recent call last)
in cell 12
ImportError: cannot import name 'Input' from 'keras.models' (C:\Users\91626\AppData\Roaming\Python\Python39\site-packages\keras\models_init_.py)

答案1

得分: 1

我认为应该是:

from tensorflow.keras.layers import Input

或者

from tensorflow.python.keras.models import Input
英文:

I think it should be:

from tensorflow.keras.layers import Input

or

from tensorflow.python.keras.models import Input

huangapple
  • 本文由 发表于 2023年2月6日 13:33:41
  • 转载请务必保留本文链接:https://go.coder-hub.com/75357654.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定