analogdevicesinc / ai8x-training

Model Training for ADI's MAX78000 and MAX78002 Edge AI Devices
Apache License 2.0
86 stars 76 forks source link

Update KWS, MSNoise, Signalmixer Data Loaders & Evaluation Notebook, Add New Scripts for Mixed Signals #299

Closed EyubogluMerve closed 2 weeks ago

EyubogluMerve commented 4 months ago

Updates

EyubogluMerve commented 3 months ago

Could you also have a look at scripts/evaluate_kws20_v3_SNR10dB.sh, and check that the MixedKWS20_10dB dataset still works, with all the changes we made to the kws20 and msnoise datasets?

Even better, I think it would be best if we integrate MixedKWS20_10dB dataset into signalmixer.py for backward compatibility purposes, then delete the unmaintained mixedkws.py. Having two files for the same purpose can be confusing.

I created the same dataset (MixedKWS20_10dB) using signalmixer.py data loader under kws20.py file. Also, I removed the mixedkws.py. In addition, I made some fixes in msnoise.py & kws20.py.

I checked all the evaluation and training scripts just in case. They're all working correctly.

EyubogluMerve commented 2 months ago

For kws20.py benchmark dataset option is added. According _getdataset function is added. benchmark parameter is set to False in order to get the regular kws20 dataset. Scripts for benchmark train + evaluate is added to the PR.

alicangok commented 1 month ago

@EyubogluMerve, could you please update your PR with the following patch I created?: MervePR.patch Thank you.

List of changes:


Note: This PR contains the evaluate_kws12_nas_benchmark.sh script, which requires a model checkpoint for the 12-class case which currently does not exist in the ongoing PR to the synthesis repo. We will either need to remove this script from this PR, or add the trained checkpoint file to the synthesis repo. (If we decide on the latter, I will make a separate PR to the synthesis repo)

alicangok commented 3 weeks ago

@EyubogluMerve, could you apply MervePR2.patch and update the PR? Other than that, it LGTM.

As @rotx-maxim requested here, this patch introduces constants to deal with the "data_type"s and replaces the | symbol with the explicit torch.logical_or() function for the index merging operation for better readability.