load.py 文件源码

python
阅读 36 收藏 0 点赞 0 评论 0

项目:python-utils 作者: zhijian-liu 项目源码 文件源码
def load_imagenet_model(name, *args, **kwargs):
    # load model and state dict
    model = getattr(torchvision.models, name)(*args, **kwargs)
    state_dict = torch.utils.model_zoo.load_url(model_path[name])

    # load state dict to model
    load_state_dict(model, state_dict)
    return model
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号