"git@developer.sourcefind.cn:OpenDAS/mmdetection3d.git" did not exist on "bb25d249f1761668fda52e1e73cc2a4b178e9e87"
Commit 6e3f514f authored by Arman Kapbasov's avatar Arman Kapbasov Committed by Facebook GitHub Bot
Browse files

Load model weights from checkpoint in non-strict mode

Summary: Updated load_from_checkpoint method call inside lighting_task.py to include extra 'strict' keyword parameter

Reviewed By: kazhang

Differential Revision: D29446372

fbshipit-source-id: b14bc13db551f0876ca78d3ea164cfb08e71a757
parent 4731c56a
...@@ -153,7 +153,7 @@ class DefaultTask(pl.LightningModule): ...@@ -153,7 +153,7 @@ class DefaultTask(pl.LightningModule):
if cfg.MODEL.WEIGHTS: if cfg.MODEL.WEIGHTS:
# only load model weights from checkpoint # only load model weights from checkpoint
logger.info(f"Load model weights from checkpoint: {cfg.MODEL.WEIGHTS}.") logger.info(f"Load model weights from checkpoint: {cfg.MODEL.WEIGHTS}.")
task = cls.load_from_checkpoint(cfg.MODEL.WEIGHTS, cfg=cfg) task = cls.load_from_checkpoint(cfg.MODEL.WEIGHTS, cfg=cfg, strict=False)
else: else:
task = cls(cfg) task = cls(cfg)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment