Skip to content

Commit

Permalink
Fixing load_target_train_checkpoint with mixing setting (#960)
Browse files Browse the repository at this point in the history
* adding loading for mix

* black style
  • Loading branch information
Yada Pruksachatkun authored Nov 15, 2019
1 parent 494e34b commit 56bedb5
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions jiant/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -467,11 +467,8 @@ def load_model_for_target_train_run(args, ckpt_path, model, strict, task, cuda_d
to_train: List of tuples of (name, weight) of trainable parameters
"""

load_model_state(model, ckpt_path, cuda_devices, skip_task_models=[task.name], strict=strict)
if args.transfer_paradigm == "finetune":
load_model_state(
model, ckpt_path, cuda_devices, skip_task_models=[task.name], strict=strict
)
# Train both the task specific models as well as sentence encoder.
to_train = [(n, p) for n, p in model.named_parameters() if p.requires_grad]
else: # args.transfer_paradigm == "frozen":
Expand Down

0 comments on commit 56bedb5

Please sign in to comment.