fairseq tuned_wer
This commit is contained in:
parent
3d0bc0ac66
commit
ab8048eec0
|
@ -23,7 +23,7 @@ model-index:
|
|||
metrics:
|
||||
- name: Test WER
|
||||
type: wer
|
||||
value: 27.08
|
||||
value: 24.91
|
||||
---
|
||||
|
||||
# Wav2Vec2-Base-760-Turkish
|
||||
|
@ -109,7 +109,7 @@ def evaluate(batch):
|
|||
logits = model(inputs.input_values.to("cuda"), attention_mask=inputs.attention_mask.to("cuda")).logits
|
||||
|
||||
pred_ids = torch.argmax(logits, dim=-1)
|
||||
batch["pred_strings"] = processor.batch_decode(pred_ids)
|
||||
batch["pred_strings"] = processor.batch_decode(pred_ids,skip_special_tokens=True)
|
||||
return batch
|
||||
|
||||
result = test_dataset.map(evaluate, batched=True, batch_size=8)
|
||||
|
@ -117,7 +117,7 @@ result = test_dataset.map(evaluate, batched=True, batch_size=8)
|
|||
print("WER: {:2f}".format(100 * wer.compute(predictions=result["pred_strings"], references=result["sentence"])))
|
||||
```
|
||||
|
||||
**Test Result**: 27.08 % (in progress)
|
||||
**Test Result**: 24.91 % (in progress)
|
||||
|
||||
|
||||
## Training
|
||||
|
|
Loading…
Reference in New Issue