Update README.md
Browse files
README.md
CHANGED
@@ -108,7 +108,7 @@ def evaluate(batch):
|
|
108 |
with torch.no_grad():
|
109 |
logits = model(inputs.input_values.to("cuda"), attention_mask=inputs.attention_mask.to("cuda")).logits
|
110 |
|
111 |
-
|
112 |
batch["pred_strings"] = processor.batch_decode(pred_ids)
|
113 |
return batch
|
114 |
|
|
|
108 |
with torch.no_grad():
|
109 |
logits = model(inputs.input_values.to("cuda"), attention_mask=inputs.attention_mask.to("cuda")).logits
|
110 |
|
111 |
+
pred_ids = torch.argmax(logits, dim=-1)
|
112 |
batch["pred_strings"] = processor.batch_decode(pred_ids)
|
113 |
return batch
|
114 |
|