Giter Site home page Giter Site logo

musicrnn's Introduction

MusicRNN

Note: Install requirements.txt before proceeding with the following. We require python version 3.9.18, so specify that when creating the python environment.

Instructions to Run the Programs ON TEST DATA

First cd into the final_proj/ folder. This contains all the code that you require for the execution for the various models.

To Run Naive Bayes

Run the following command:

python3 test.py

This should load the JSON file containing already parsed data for "training" Naive Bayes and then also load the pickle file containing the Music21 parsed version of the test data. It should then run Naive Bayes on each measure of the test data. THIS WILL TAKE A WHILE TO CREATE PICKLE FILES AND THEN LOAD ALL THE JSON DATA.

To Run RNN

Run the following command:

python test_rnn -m [mode= 'pre', 'create', 'train', 'eval'] -E [epochs] -B [batch size] -L [l.r.]

Note: If you are working with the most recent version of the code and want to train and test the model, you only need to run train and eval. The preprocessing and tensor creation is already done.

To Run LSTM

Run the following command:

python test_rnn -m [mode= 'pre', 'create', 'train', 'eval'] -E [epochs] -B [batch size] -L [l.r.]

Only include the flags if you want to use the modified datasets for the following:

--clean : [for the dataset with the simplified notes]
--downbeat : [for the dataset wth only downbeats]

Note: If you are working with the most recent version of the code and want to train and test the model, you only need to run train and eval. The preprocessing and tensor creation is already done.

To Run Transformer

Run the following command:

python3 test_transformer.py

General Advice

The RNN, LSTM, and Transformer models are set up to use CUDA and benefit greatly from using it.

musicrnn's People

Contributors

varun-punater avatar a-harhar avatar rijul14 avatar

Watchers

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