mirror of
https://github.com/modelscope/modelscope.git
synced 2026-02-24 20:19:51 +01:00
[to #42322933] feat: optimize ANS metric value
Link: https://code.alibaba-inc.com/Ali-MaaS/MaaS-lib/codereview/10399100
This commit is contained in:
@@ -35,6 +35,8 @@ class AudioNoiseMetric(Metric):
|
||||
total_loss = avg_loss + avg_amp + avg_phase + avg_sisnr
|
||||
return {
|
||||
'total_loss': total_loss.item(),
|
||||
'avg_sisnr': avg_sisnr.item(),
|
||||
# model use opposite number of sisnr as a calculation shortcut.
|
||||
# revert it in evaluation result
|
||||
'avg_sisnr': -avg_sisnr.item(),
|
||||
MetricKeys.AVERAGE_LOSS: avg_loss.item()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user