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


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/
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)

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

0 comments on commit fbfa1e4

Please sign in to comment.