YuanGongND / ast

Code for the Interspeech 2021 paper "AST: Audio Spectrogram Transformer".
BSD 3-Clause "New" or "Revised" License
1.13k stars 212 forks source link

Fixed errors in getting stat #8

Closed saifkhan-m closed 3 years ago

saifkhan-m commented 3 years ago

While evaluating the normalization stats, I was getting some small errors related to the audio_conf configuration. I have added the relevant fixes and now I am able to get the stats without any problem.

Problem summary

  1. The values of dataset and mode was not provided in the audio_conf.
  2. Since we are processing the dataset to get the normalization stats, we can't give the values of mean and std to the dataloader. I have added an extra config parameter get_norm_stats and enclosed this line in an if statement with get_norm_stats.