feat: add scoliosis skeleton experiment tooling
This commit is contained in:
@@ -353,6 +353,18 @@ class BaseModel(MetaModel, nn.Module):
|
||||
weights_only=False,
|
||||
)
|
||||
model_state_dict = checkpoint['model']
|
||||
current_state_keys = set(self.state_dict().keys())
|
||||
stale_loss_keys = [
|
||||
key for key in model_state_dict.keys()
|
||||
if key.startswith("loss_aggregator.") and key not in current_state_keys
|
||||
]
|
||||
for key in stale_loss_keys:
|
||||
model_state_dict.pop(key)
|
||||
if stale_loss_keys:
|
||||
self.msg_mgr.log_warning(
|
||||
"Ignoring stale loss state from %s: %s"
|
||||
% (save_name, stale_loss_keys)
|
||||
)
|
||||
|
||||
if not load_ckpt_strict:
|
||||
self.msg_mgr.log_info("-------- Restored Params List --------")
|
||||
|
||||
Reference in New Issue
Block a user