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