Skip to content

Commit

Permalink
Reset GRU context
Browse files Browse the repository at this point in the history
  • Loading branch information
hm-ysjiang committed Jun 7, 2023
1 parent cec2a79 commit b7546ea
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion train-selfsupervised.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ def train(args):
if args.reset_context:
_weight = OrderedDict()
for key, val in checkpoint.items():
if '.cnet.' not in key:
if '.cnet.' not in key and '.update_block.gru.' not in key:
_weight[key] = val
weight = _weight
model.load_state_dict(weight, strict=(not args.allow_nonstrict))
Expand Down
2 changes: 1 addition & 1 deletion train-supervised.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ def train(args):
if args.reset_context:
_weight = OrderedDict()
for key, val in checkpoint.items():
if '.cnet.' not in key:
if '.cnet.' not in key and '.update_block.gru.' not in key:
_weight[key] = val
weight = _weight
model.load_state_dict(weight, strict=(not args.allow_nonstrict))
Expand Down

0 comments on commit b7546ea

Please sign in to comment.