【问题标题】:why ResNet50 include_top argument giving error?为什么 ResNet50 include_top 参数给出错误?
【发布时间】:2018-11-18 04:56:59
【问题描述】:

Keras 版本 - 2.2.4

Python - 3.6.6

问题:

from resnet50 import ResNet50

----> 6 模型 = ResNet50(input_tensor=image_input, include_top=True,weights='imagenet')

TypeError: _obtain_input_shape() 得到了一个意外的关键字参数 'include_top'

有解决办法吗?

【问题讨论】:

  • 请提供一个完整的工作示例,包括所有导入和完整的回溯。
  • 这不是一个完整的工作示例,将代码包含为图像是非常糟糕的做法。喜欢文字。

标签: keras deep-learning


【解决方案1】:

替换:

model = ResNet50(input_tensor=image_input, include_top=True,weights='imagenet')

与:

model = ResNet50(input_tensor=image_input,require_flatten=True,weights='imagenet')

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-11-10
    • 1970-01-01
    • 1970-01-01
    • 2020-10-16
    相关资源
    最近更新 更多