From de0612ca093b4e238d13581cfaf00a189e8826d9 Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Thu, 19 Sep 2019 18:08:21 +0200 Subject: [PATCH] updates --- train.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/train.py b/train.py index aaef96c8..bd056686 100644 --- a/train.py +++ b/train.py @@ -108,11 +108,11 @@ def train(): chkpt = torch.load(weights, map_location=device) # load model - if opt.transfer: - chkpt['model'] = {k: v for k, v in chkpt['model'].items() if model.state_dict()[k].numel() == v.numel()} - model.load_state_dict(chkpt['model'], strict=False) - else: - model.load_state_dict(chkpt['model']) + # if opt.transfer: + chkpt['model'] = {k: v for k, v in chkpt['model'].items() if model.state_dict()[k].numel() == v.numel()} + model.load_state_dict(chkpt['model'], strict=False) + # else: + # model.load_state_dict(chkpt['model']) # load optimizer if chkpt['optimizer'] is not None: