VibhuJawa commited on
Commit
834a261
1 Parent(s): 7adb1f9

Update README.md

Browse files

We should add `model.eval` here as there is a dropout layer here and results will become incorrect without it.

Files changed (1) hide show
  1. README.md +1 -0
README.md CHANGED
@@ -109,6 +109,7 @@ class CustomModel(nn.Module, PyTorchModelHubMixin):
109
  config = AutoConfig.from_pretrained("nvidia/multilingual-domain-classifier")
110
  tokenizer = AutoTokenizer.from_pretrained("nvidia/multilingual-domain-classifier")
111
  model = CustomModel.from_pretrained("nvidia/multilingual-domain-classifier")
 
112
 
113
  # Prepare and process inputs
114
  text_samples = ["Los deportes son un dominio popular", "La política es un dominio popular"]
 
109
  config = AutoConfig.from_pretrained("nvidia/multilingual-domain-classifier")
110
  tokenizer = AutoTokenizer.from_pretrained("nvidia/multilingual-domain-classifier")
111
  model = CustomModel.from_pretrained("nvidia/multilingual-domain-classifier")
112
+ model.eval()
113
 
114
  # Prepare and process inputs
115
  text_samples = ["Los deportes son un dominio popular", "La política es un dominio popular"]