Skip to content
This repository has been archived by the owner on Feb 22, 2020. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
fix(transformer): add model eval
  • Loading branch information
jemmyshin committed Sep 6, 2019
1 parent 2066beb commit fbfa1e4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gnes/encoder/text/transformer.py
Expand Up @@ -50,7 +50,7 @@ def post_init(self):
(RobertaModel, RobertaTokenizer, 'roberta-base')]}[self.model_name]

def load_model_tokenizer(x):
return model_class.from_pretrained(x), tokenizer_class.from_pretrained(x)
return model_class.from_pretrained(x).eval(), tokenizer_class.from_pretrained(x)

try:
self.model, self.tokenizer = load_model_tokenizer(self.work_dir)
Expand Down

0 comments on commit fbfa1e4

Please sign in to comment.