【问题标题】:EfficientnetB1 :ValueError: You are trying to load a weight file containing 185 layers into a model with 184 layersEfficientnetB1 :ValueError: 您正在尝试将包含 185 层的权重文件加载到具有 184 层的模型中
【发布时间】:2021-02-19 07:04:21
【问题描述】:

我在使用时遇到错误

model = EfficientNetB1(weights="efficientnetb1_notop.h5", include_top=False)

在我将预训练权重 model.ckpt 转换为efficientnetb1_notop.h5 之后

请帮忙

【问题讨论】:

    标签: python pre-trained-model efficientnet


    【解决方案1】:

    您使用的是带标签的数据还是使用标签预训练的数据?

    include_top=True 完全按原样部署模型。

    【讨论】:

    • 我正在使用我的标记数据,因为当我使用来自 imagenet 的权重时,我的准确率停留在 90% 左右,我想将其增加到最大值
    • 如果您正在使用您的数据,那么您需要 include_top = False 。您还需要在最后一步添加类数。
    猜你喜欢
    • 2020-06-17
    • 2019-06-12
    • 1970-01-01
    • 2022-07-23
    • 2020-01-25
    • 1970-01-01
    • 2019-01-03
    • 2018-11-27
    • 2019-04-10
    相关资源
    最近更新 更多