This commit is contained in:
Glenn Jocher 2019-04-02 18:10:53 +02:00
parent 03559eff6e
commit 7f220a14cb
1 changed files with 1 additions and 1 deletions

View File

@ -53,7 +53,7 @@ def train(
if resume: # Load previously saved PyTorch model if resume: # Load previously saved PyTorch model
if transfer: # Transfer learning if transfer: # Transfer learning
chkpt = torch.load(weights + 'yolov3-tiny.pt', map_location=device) chkpt = torch.load(weights + 'yolov3.pt', map_location=device)
model.load_state_dict( model.load_state_dict(
{k: v for k, v in chkpt['model'].items() if (int(k.split('.')[1]) + 1) not in yl}, strict=False) {k: v for k, v in chkpt['model'].items() if (int(k.split('.')[1]) + 1) not in yl}, strict=False)
for (name, p) in model.named_parameters(): for (name, p) in model.named_parameters():