GithubHelp home page GithubHelp logo

frankzd / blockcirculantrnn Goto Github PK

View Code? Open in Web Editor NEW

This project forked from lz1313/blockcirculantrnn

0.0 2.0 0.0 50 KB

BlockCIrculantRNN (LSTM and GRU) using TensorFlow

License: Apache License 2.0

Python 99.62% Shell 0.38%

blockcirculantrnn's Introduction

BlockCIrculantRNN

BlockCIrculantRNN (LSTM and GRU) using TensorFlow. This project implements the block circulant matrix based training of RNN models, The code is based on clean version of this project. For more details, please refer to the paper

@inproceedings{wang2018c,
  title={C-LSTM: Enabling Efficient LSTM using Structured Compression Techniques on FPGAs},
  author={Wang, Shuo and Li, Zhe and Ding, Caiwen and Yuan, Bo and Qiu, Qinru and Wang, Yanzhi and Liang, Yun},
  booktitle={Proceedings of the 2018 ACM/SIGDA International Symposium on Field-Programmable Gate Arrays},
  pages={11--20},
  year={2018},
  organization={ACM}
}

Other references

@article{li2018efficient,
  title={Efficient Recurrent Neural Networks using Structured Matrices in FPGAs},
  author={Li, Zhe and Wang, Shuo and Ding, Caiwen and Qiu, Qinru and Wang, Yanzhi and Liang, Yun},
  journal={arXiv preprint arXiv:1803.07661},
  year={2018}
}

Make sure you convert the TIMIT dataset from NIST format wav to RIFF format wavform

# Install sox
sudo apt-get install sox
# Use provided tools to convert TIMIT wav files
cd preprocessing
bash nist2wav.sh /xxx/xxx/TIMIT

To preprocess the TIMIT dataset, run

cd preprocessing
# Training set
python timit_preprocess_main.py \
--input_path=/xxx/xxx/TIMIT \
--output_path=/xxx/xxx/timit_preproc \
--level=phn \
--split=TRAIN

# Test set
python timit_preprocess_main.py \
--input_path=/xxx/xxx/TIMIT \
--output_path=/xxx/xxx/timit_preproc \
--level=phn \
--split=TEST

To Train the model, run

# Training a baseline
python timit_train_eval.py \
--input_data_dir=/xxx/xxx/timit_preproc \
--exp_dir=/xxx/xxx/timit_exp \
--level=phn \
--cell=LSTM \
--is_training=True

# Training block circulant model
python timit_train_eval.py \
--input_data_dir=/xxx/xxx/timit_preproc \
--exp_dir=/xxx/xxx/timit_exp \
--level=phn \
--cell=LSTM \
--partition_size=8 \
--is_training=True

To test the model, run

# Test a baseline
python timit_train_eval.py \
--input_data_dir=/xxx/xxx/timit_preproc \
--exp_dir=/xxx/xxx/timit_exp \
--level=phn \
--cell=LSTM \
--is_training=False \
--restore=True

# Test block circulant model
python timit_train_eval.py \
--input_data_dir=/xxx/xxx/timit_preproc \
--exp_dir=/xxx/xxx/timit_exp \
--level=phn \
--cell=LSTM \
--partition_size=8 \
--is_training=False \
--restore=True

For more argument options, check the code.

blockcirculantrnn's People

Contributors

lz1313 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.