How is compute_metrics working internally?
Hi everyone, I am following this blog postFine-Tune XLSR-Wav2Vec2 for low-resource ASR with 🤗 Transformerson fine-tuning an ASR model, and there is something I don’t understand about thecompute_metricsfunction.In the notebook, we want to compute theWord Error Ratefor the validation set, everyeval_stepssteps. What is the input of this function? Does it take one batch at a time, or the whole validation dataset? If it takes one batch at a time, how is the finalWERthat is diplayed calculated? Is it the mean of all theWERs of all the batches?Pinging the author of this blog post as well@patrickvonplaten. I’d appreciate any insight you guys can give me.Thanks in advance.
2021-08-30T18:10:35Z
Thecompute_metricsfunction takes the predictions and labels over the whole evaluation dataset and computes the metrics from them.
2021-08-30T19:53:03Z
Thank you.