地址链接:https://www.flyai.com/m/adv-efficientnet-b6-ac80338e.pth
确定自己使用的框架并导入对应的库。导入库实现样例代码可参考 文档中心-预训练模型使用教程
在代码中实现加载预训练模型地址
from efficientnet_pytorch import EfficientNet
import torch
model = EfficientNet.from_name("efficientnet-b6")
from flyai.utils import remote_helper
path=remote_helper.get_remote_date("https://www.flyai.com/m/adv-efficientnet-b6-ac80338e.pth")
load_fc = False
state_dict = torch.load(path)
if load_fc:
model.load_state_dict(state_dict)
else:
state_dict.pop('_fc.weight')
state_dict.pop('_fc.bias')
res = model.load_state_dict(state_dict, strict=False)
assert set(res.missing_keys) == set(['_fc.weight', '_fc.bias']), 'issue loading pretrained weights'
efficientnet_b3_ra2-cf984f9c.pth
查看来源:https://github.com/rwightman/pytorch-image-models/releases/download/v0.1-weights/efficientnet_b3_ra2-cf984f9c.pthadv-efficientnet-b3-cdd7c0f4.pth
查看来源:https://github.com/lukemelas/EfficientNet-PyTorch/releases/download/1.0/adv-efficientnet-b3-cdd7c0f4.pthadv-efficientnet-b6-ac80338e.pth
查看来源:https://github.com/lukemelas/EfficientNet-PyTorch/releases/download/1.0/adv-efficientnet-b6-ac80338e.pthefficientnet_b1-533bc792.pth
查看来源:https://github.com/rwightman/pytorch-image-models/releases/download/v0.1-weights/efficientnet_b1-533bc792.pthefficientnet_b0_ra-3dd342df.pth
查看来源:https://github.com/rwightman/pytorch-image-models/releases/download/v0.1-weights/efficientnet_b0_ra-3dd342df.pthSelf-Trans.pt
查看来源:https://github.com/UCSD-AI4H/COVID-CT/tree/master/baseline%20methods/Self-Trans#self-transefficientnet_b2_ra-bcdf34b7.pth
查看来源:https://github.com/rwightman/pytorch-image-models/releases/download/v0.1-weights/efficientnet_b2_ra-bcdf34b7.pth