提交 2c470c77 编写于 作者: Bubbliiiing's avatar Bubbliiiing

update pretrained

上级 81de6643
......@@ -109,11 +109,11 @@ class CSPDarknet(nn.Module):
if pretrained:
phi = 'l'
url = {
"l" : 'https://github.com/bubbliiiing/yolov7-pytorch/releases/download/v1.0/cspdarknet_backbone_l.pth',
"l" : 'https://github.com/bubbliiiing/yolov7-pytorch/releases/download/v1.0/cspdarknet_backbone.pth',
}[phi]
checkpoint = torch.hub.load_state_dict_from_url(url=url, map_location="cpu", model_dir="./model_data")
self.load_state_dict(checkpoint, strict=False)
print("Load weights from ", url.split('/')[-1])
print("Load weights from " + url.split('/')[-1])
def forward(self, x):
x = self.stem(x)
......
......@@ -77,7 +77,7 @@ def download_weights(model_dir="./model_data"):
phi = "l"
download_urls = {
"l" : 'https://github.com/bubbliiiing/yolov7-pytorch/releases/download/v1.0/cspdarknet_backbone_l.pth',
"l" : 'https://github.com/bubbliiiing/yolov7-pytorch/releases/download/v1.0/cspdarknet_backbone.pth',
}
url = download_urls[phi]
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册