updates
This commit is contained in:
parent
6fd450c904
commit
1f943e886f
1
train.py
1
train.py
|
@ -114,7 +114,6 @@ def train():
|
||||||
try:
|
try:
|
||||||
chkpt['model'] = {k: v for k, v in chkpt['model'].items() if model.state_dict()[k].numel() == v.numel()}
|
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)
|
model.load_state_dict(chkpt['model'], strict=False)
|
||||||
# model.load_state_dict(chkpt['model'])
|
|
||||||
except KeyError as e:
|
except KeyError as e:
|
||||||
s = "%s is not compatible with %s. Specify --weights '' or specify a --cfg compatible with %s. " \
|
s = "%s is not compatible with %s. Specify --weights '' or specify a --cfg compatible with %s. " \
|
||||||
"See https://github.com/ultralytics/yolov3/issues/657" % (opt.weights, opt.cfg, opt.weights)
|
"See https://github.com/ultralytics/yolov3/issues/657" % (opt.weights, opt.cfg, opt.weights)
|
||||||
|
|
Loading…
Reference in New Issue