Skip to content

vaibhav016/FILRCN

Repository files navigation

Feature integration in acoustic models using Low Rank Spectro-Temporal Decomposition in Convolutional Nets 🎤

GitHub python tensorflow PyPI

Visit this site for interactive plots https://vaibhav016.github.io/FILRCN/ 😄

What's New?

Table of Contents

Publications

Installing from source

git clone https://github.com/vaibhav016/FILRCN.git
cd FILRCN
python setup.py build
python setup.py install

Running in a container

docker-compose up -d

Setup training and testing

  • For mixed precision training, use flag --mxp when running python scripts from examples

  • For enabling XLA, run TF_XLA_FLAGS=--tf_xla_auto_jit=2 python3 $path_to_py_script)

  • For hiding warnings, run export TF_CPP_MIN_LOG_LEVEL=2 before running any examples

Features Extraction

See features_extraction

Augmentations

See augmentations

Training & Testing Tutorial

  1. Define config YAML file, see the config.yml files in the example folder for reference (you can copy and modify values such as parameters, paths, etc.. to match your local machine configuration)
  2. Download your corpus (a.k.a datasets) and run download_links.shscripts folder to download files For more detail, see datasets. Note: Make sure your data contain only characters in your language, for example, english has a to z and '. Do not use cache if your dataset size is not fit in the RAM.
  3. [Optional] Generate TFRecords to use tf.data.TFRecordDataset for better performance by using the script create_tfrecords.py
  4. Create vocabulary file (characters or subwords/wordpieces) by defining language.characters, using the scripts generate_vocab_subwords.py or generate_vocab_sentencepiece.py. There're predefined ones in vocabularies
  5. [Optional] Generate metadata file for your dataset by using script generate_metadata.py. This metadata file contains maximum lengths calculated with your config.yml and total number of elements in each dataset, for static shape training and precalculated steps per epoch.
  6. run create_transcripts_from_data.sh from scrpts folder to generate .tsv files(the format in which the input is given is .tsv)
  7. For training, see train.py files in the example folder to see the options
  8. For testing, see test.py files in the example folder to see the options.

Loss landscape visualisation and gradient attribution

For visualisations, we have two kinds of scripts. cd examples/contextnet/contextnet_visualisation

  1. for loss landscapes, cd into context_visualisation/loss_landscape_visualisation.
    1. run generate_lists.py(This generates the loss and accuracy lists)
    2. now run plot_loss.py (From those lists, images are drawn both 2d and 3d)
    3. now run video_create.py(It sews all the images into a single video)
  2. For gradient visualisation,
    1. run integrated_grad_vis.py, which will generate the integrated gradients for all the trained models
    2. then run plot_gradients.py
    3. Finally run video_create.py

Gradient_Visualisation_Notebook Open In Colab

Loss Lists Notebook Open In Colab

For loss landscape, go to drive

For gradient attribution, go to drive

gradients attribution

loss landscape

English Dataset

Name Source Hours
LibriSpeech LibriSpeech 970h

References & Credits

  1. TensorFlowASR
  2. Loss landscape visualisation
  3. Keras Integrated Gradients

Contact

Vaibhav Singh ([email protected])

Dr Vinayak Abrol ([email protected])

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published