We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f95cd41 commit e6998edCopy full SHA for e6998ed
train_net.py
@@ -443,7 +443,10 @@ def main(args=None):
443
trainer.resume_or_load(resume=args.resume)
444
if args.original_load: # loading checkpoints with different name prefix
445
print("using original loading")
446
- trainer._trainer.model.module = trainer._trainer.model.module.from_pretrained(cfg.MODEL.WEIGHTS)
+ try:
447
+ trainer._trainer.model.module = trainer._trainer.model.module.from_pretrained(cfg.MODEL.WEIGHTS)
448
+ except Exception as e: # for debugging
449
+ trainer._trainer.model = trainer._trainer.model.from_pretrained(cfg.MODEL.WEIGHTS)
450
return trainer.train()
451
452
0 commit comments