RepVGG-A0-train.pth
PyTorch CNN
在线加载模型地址

确定自己使用的框架并导入对应的库。导入库实现样例代码可参考 文档中心-预训练模型使用教程

在代码中实现加载预训练模型地址

调用模型的实现方法

#次模型pytorch没有进行开源,2021年CVPR对此方法进行开源,开源代码地址:DingXiaoH/RepVGG: RepVGG: Making VGG-style ConvNets Great Again (github.com)

from repvgg import get_RegVGG_func_by_name  

repvgg_build_func=get_RegVGG_func_by_name ('RepVGG-A0')

model=repvgg_build_func(deploy=False)

path=remote_get_remote_data("https://www.flyai.com/m/RepVGG-A0-train.pth")

model.loda_state_dict(torch.load(path))

model.fc=nn.Linear(1280,200)#输出节点数可自行定义