Skip to content

Commit

Permalink
Update Trainer.py
Browse files Browse the repository at this point in the history
  • Loading branch information
liuwei1206 authored Jun 7, 2021
1 parent 58d6b76 commit dc23bdf
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions Trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,6 @@ def get_optimizer(model, args, num_training_steps):
we provide a reasonable default that works well
If you want to use something else, you can pass a tuple in the Trainer's init,
or override this method in a subclass.
Args:
optim_type: AdamW or SGD
"""
no_bigger = ["word_embedding", "attn_w", "word_transform", "word_word_weight", "hidden2tag",
"lstm", "crf"]
Expand Down Expand Up @@ -550,10 +548,7 @@ def main():
model = BertWordLSTMCRFForTokenClassification.from_pretrained(
args.model_name_or_path, config=config,
pretrained_embeddings=pretrained_word_embedding,
num_labels=label_vocab.get_item_size(),
word_pooling_type=args.word_pooling_type,
do_transform=args.do_transform,
fix_bert = args.fix_bert
num_labels=label_vocab.get_item_size()
)

if not args.no_cuda:
Expand Down

0 comments on commit dc23bdf

Please sign in to comment.