Giter VIP home page Giter VIP logo

bachbot's Introduction

BachBot

BachBot is a research project utilizing long short term memory (LSTMs) to generate Bach compositions.

Installation

Docker container images are hosted on DockerHub.

CPU-only

docker pull fliang/bachbot:base

CUDA-7.5

docker pull fliang/bachbot:CUDA-7.5

Getting Started

Set up environment

source scripts/activate

Prepare polyphonic Bach chorale corpus and train torch-rnn LSTM.

bachbot chorales prepare_poly && \
	bachbot concatenate_corpus scratch/*.utf && \
	bachbot make_h5 && \
	bachbot train

Sample the trained LSTM and decode output to musicXML.

bachbot sample <path_to_checkpoint> -t <temperature> && \
	bachbot decode decode_chord_constant_t_utf scratch/utf_to_txt.json scratch/sampled_<temperature>.utf

Workflow

  • source ./scripts/activate.zsh to set up the working environment
    • Pro-tip: Add source ~/bachbot/scripts/activate to your .{bash|zsh}rc
  • To develop on the scripts
     cd ./scripts
     pip install --editable .
    
    The bachbot shell command will use the entry point defined inside ./scripts/setup.py.
  • To generate ctags which include system Python libraries
     ctags -R -f ./tags `python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()"`<CR>
    

bachbot's People

Contributors

feynmanliang avatar markgotham 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.