A project that trains a LSTM recurrent neural network over a dataset of MIDI files. More information can be found on the writeup about this project. This the code for 'Build an AI Composer' on Youtube
Use pip to install any missing dependencies
You will see "export TF_BINARY_URL" followed by a URL. Modify the part of the url that has "tensorflow-0.10.0", so that it will download version 0.8.0, not version 0.10.0 "tensorflow-0.8.0.
Example of the modified url, for the Python 2.7 CPU version of Tensorflow:
export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.8.0-cp27-none-linux_x86_64.whl
sudo pip install --upgrade $TF_BINARY_URL
Follow the third step normally to install Tensorflow.
pip install matplotlib
sudo apt-get install python-tk
pip install numpy
cd ~
git clone https://github.com/vishnubob/python-midi
cd python-midi
python setup.py install
cd ~
git clone https://github.com/bspaans/python-mingus
cd python-mingus
python setup.py install
mkdir data && mkdir models
python rnn_sample.py --config_file new_config_file.config
to generate a new MIDI song.Give it 1-2 hours to train on your local machine, then generate the new song. You don't have to wait for it to finish, just wait until you see the 'saving model' message in terminal. In a future video, I'll talk about how to easily setup cloud GPU training. Likely using www.fomoro.com
Credit for the vast majority of code here goes to Yoav Zimmerman. I've merely created a wrapper around all of the important functions to get people started.