Update README.md
Browse filesWe should add `model.eval` here as there is a dropout layer here and results will become incorrect without it.
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"]
|