Code Monkey home page Code Monkey logo

magenta's Introduction

Status

This repository is currently inactive and serves only as a supplement some of our papers. We have transitioned to using individual repositories for new projects. For our current work, see the Magenta website and Magenta GitHub Organization.

Magenta

Build Status PyPI version

Magenta is a research project exploring the role of machine learning in the process of creating art and music. Primarily this involves developing new deep learning and reinforcement learning algorithms for generating songs, images, drawings, and other materials. But it's also an exploration in building smart tools and interfaces that allow artists and musicians to extend (not replace!) their processes using these models. Magenta was started by some researchers and engineers from the Google Brain team, but many others have contributed significantly to the project. We use TensorFlow and release our models and tools in open source on this GitHub. If you’d like to learn more about Magenta, check out our blog, where we post technical details. You can also join our discussion group.

This is the home for our Python TensorFlow library. To use our models in the browser with TensorFlow.js, head to the Magenta.js repository.

Getting Started

Take a look at our colab notebooks for various models, including one on getting started. Magenta.js is also a good resource for models and demos that run in the browser. This and more, including blog posts and Ableton Live plugins, can be found at https://magenta.tensorflow.org.

Magenta Repo

Installation

Magenta maintains a pip package for easy installation. We recommend using Anaconda to install it, but it can work in any standard Python environment. We support Python 3 (>= 3.5). These instructions will assume you are using Anaconda.

Automated Install (w/ Anaconda)

If you are running Mac OS X or Ubuntu, you can try using our automated installation script. Just paste the following command into your terminal.

curl https://raw.githubusercontent.com/tensorflow/magenta/main/magenta/tools/magenta-install.sh > /tmp/magenta-install.sh
bash /tmp/magenta-install.sh

After the script completes, open a new terminal window so the environment variable changes take effect.

The Magenta libraries are now available for use within Python programs and Jupyter notebooks, and the Magenta scripts are installed in your path!

Note that you will need to run source activate magenta to use Magenta every time you open a new terminal window.

Manual Install (w/o Anaconda)

If the automated script fails for any reason, or you'd prefer to install by hand, do the following steps.

Install the Magenta pip package:

pip install magenta

NOTE: In order to install the rtmidi package that we depend on, you may need to install headers for some sound libraries. On Ubuntu Linux, this command should install the necessary packages:

sudo apt-get install build-essential libasound2-dev libjack-dev portaudio19-dev

On Fedora Linux, use

sudo dnf group install "C Development Tools and Libraries"
sudo dnf install SAASound-devel jack-audio-connection-kit-devel portaudio-devel

The Magenta libraries are now available for use within Python programs and Jupyter notebooks, and the Magenta scripts are installed in your path!

Using Magenta

You can now train our various models and use them to generate music, audio, and images. You can find instructions for each of the models by exploring the models directory.

Development Environment

If you want to develop on Magenta, you'll need to set up the full Development Environment.

First, clone this repository:

git clone https://github.com/tensorflow/magenta.git

Next, install the dependencies by changing to the base directory and executing the setup command:

pip install -e .

You can now edit the files and run scripts by calling Python as usual. For example, this is how you would run the melody_rnn_generate script from the base directory:

python magenta/models/melody_rnn/melody_rnn_generate --config=...

You can also install the (potentially modified) package with:

pip install .

Before creating a pull request, please also test your changes with:

pip install pytest-pylint
pytest

PIP Release

To build a new version for pip, bump the version and then run:

python setup.py test
python setup.py bdist_wheel --universal
twine upload dist/magenta-N.N.N-py2.py3-none-any.whl

magenta's People

Contributors

adarob avatar asleep avatar cghawthorne avatar cifkao avatar cinjon avatar czhuang avatar danabo avatar daphnei avatar davidprimor avatar douglaseck avatar dustinvtran avatar falaktheoptimist avatar fredbertsch avatar gauravmishra avatar gmittal avatar hardmaru avatar hawkinsp avatar iansimon avatar jesseengel avatar jhowcrof avatar jsawruk avatar kastnerkyle avatar khanhlvg avatar korymath avatar kousun12 avatar natashamjaques avatar nirajpandkar avatar sun51 avatar yilei avatar zuzoovn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

magenta's Issues

Are small monophonic midi files being ignored?

My Magneta works fine, but ignores many monophonic midi files (possibly because of mal-formed headers). I recently found out that my Magenta also ignores the magenta/testdata/example.mid file, while working fine with the complex_example.mid file.

If I delete the complex_example.mid file leaving only the example.mid file then no melodies are found. This behaviour did not happen a few weeks ago.

Here is a text equivalent of the example.mid file

MFile 1 2 220
MTrk
0 TimeSig 4/4 24 8
0 Tempo 250000
0 KeySig 0 major
1 Meta TrkEnd
TrkEnd
MTrk
0 PrCh ch=1 p=0
0 On ch=1 n=60 v=100
209 On ch=1 n=60 v=0
220 On ch=1 n=62 v=100
429 On ch=1 n=62 v=0
440 On ch=1 n=64 v=100
649 On ch=1 n=64 v=0
660 On ch=1 n=65 v=100
869 On ch=1 n=65 v=0
880 On ch=1 n=67 v=100
1089 On ch=1 n=67 v=0
1100 On ch=1 n=69 v=100
1309 On ch=1 n=69 v=0
1320 On ch=1 n=71 v=100
1529 On ch=1 n=71 v=0
1540 On ch=1 n=72 v=100
1749 On ch=1 n=72 v=0
1750 Meta TrkEnd
TrkEnd

Here is the text equivalent of a working monophonic midi files

MFile 0 1 480
MTrk
0 Tempo 400000
0 KeySig 2 major
0 TimeSig 4/4 48 8
0 Meta TrkName "Astleys Ride"
0 Meta Text "C:Trad"
0 On ch=1 n=81 v=105
239 Off ch=1 n=81 v=0
240 On ch=1 n=78 v=80
479 Off ch=1 n=78 v=0
480 On ch=1 n=74 v=105
959 Off ch=1 n=74 v=0
960 On ch=1 n=74 v=80
1439 Off ch=1 n=74 v=0
1440 On ch=1 n=74 v=95.
.
.
.
lots of note on off's (col1.mid)
.
.
.
59999 Off ch=1 n=73 v=0
60000 On ch=1 n=74 v=105
60959 Off ch=1 n=74 v=0
60960 On ch=1 n=74 v=95
61439 Off ch=1 n=74 v=0
61920 Meta TrkEnd

ERROR: Non-zero return code '1' from command

$ sh 2extractSample.sh
WARNING: /home/oatmeal/.cache/bazel/_bazel_oatmeal/c3300a0566708e561674ab71c996c139/external/protobuf/WORKSPACE:1: Workspace name in /home/oatmeal/.cache/bazel/_bazel_oatmeal/c3300a0566708e561674ab71c996c139/external/protobuf/WORKSPACE (@main) does not match the name given in the repository's definition (@protobuf); this will cause a build error in future versions.
INFO: Found 1 target...
Target //magenta/models/basic_rnn:basic_rnn_create_dataset up-to-date:
bazel-bin/magenta/models/basic_rnn/basic_rnn_create_dataset
INFO: Elapsed time: 0.144s, Critical Path: 0.00s

INFO: Running command line: bazel-bin/magenta/models/basic_rnn/basic_rnn_create_dataset '--input=/home/oatmeal/HiMusic/Output/Dance_sequences.tfrecord' '--train_output=/home/oatmeal/HiMusic/Output/train_dance.tfrecord' '--eval_ratio=0.10'
Traceback (most recent call last):
File "/home/oatmeal/.cache/bazel/_bazel_oatmeal/c3300a0566708e561674ab71c996c139/execroot/magenta/bazel-out/local-opt/bin/magenta/models/basic_rnn/basic_rnn_create_dataset.runfiles/main/magenta/models/basic_rnn/basic_rnn_create_dataset.py", line 41, in
tf.app.run()
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/platform/app.py", line 30, in run
sys.exit(main(sys.argv))
File "/home/oatmeal/.cache/bazel/_bazel_oatmeal/c3300a0566708e561674ab71c996c139/execroot/magenta/bazel-out/local-opt/bin/magenta/models/basic_rnn/basic_rnn_create_dataset.runfiles/main/magenta/models/basic_rnn/basic_rnn_create_dataset.py", line 37, in main
basic_rnn_encoder_decoder.MelodyEncoderDecoder())
File "/home/oatmeal/.cache/bazel/_bazel_oatmeal/c3300a0566708e561674ab71c996c139/execroot/magenta/bazel-out/local-opt/bin/magenta/models/basic_rnn/basic_rnn_create_dataset.runfiles/main/magenta/models/shared/melody_rnn_create_dataset.py", line 121, in run_from_flags
FLAGS.output_dir)
File "/home/oatmeal/.cache/bazel/_bazel_oatmeal/c3300a0566708e561674ab71c996c139/execroot/magenta/bazel-out/local-opt/bin/magenta/models/basic_rnn/basic_rnn_create_dataset.runfiles/main/magenta/pipelines/pipeline.py", line 196, in run_pipeline_serial
if not tf.gfile.Exists(output_dir):
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/platform/gfile.py", line 252, in Exists
return os.path.exists(path)
File "/usr/lib/python2.7/genericpath.py", line 18, in exists
os.stat(path)
TypeError: coercing to Unicode: need string or buffer, NoneType found
ERROR: Non-zero return code '1' from command: Process exited with status 1.

oatmeal@oatmeal-ThinkPad-X240:~/HiMusic/magenta$ cat 2extractSample.sh
SEQUENCES_TFRECORD=/home/oatmeal/HiMusic/Output/Dance_sequences.tfrecord
TRAIN_DATA=/home/oatmeal/HiMusic/Output/train_dance.tfrecord
EVAL_RATIO=0.10

bazel run //magenta/models/basic_rnn:basic_rnn_create_dataset --
--input=$SEQUENCES_TFRECORD
--train_output=$TRAIN_DATA
--eval_ratio=$EVAL_RATIO

oatmeal@oatmeal-ThinkPad-X240:~/HiMusic/magenta$ ls -l /home/oatmeal/HiMusic/Output/Dance_sequences.tfrecord
-rw-r--r-- 1 oatmeal oatmeal 891921 8月 1 22:59 /home/oatmeal/HiMusic/Output/Dance_sequences.tfrecord

Enhancement: Functionality to adjust the degree (Temperature/Entropy) of the trained dataset when generating final midi files

A functionality to allow some variability in Magenta's ability to snap to a remembered song. As the loss becomes closer to zero Magenta tends to remember a trained song instead of merging the components of several songs.

See discussion on google groups tensorflow magenta discuss at

https://groups.google.com/a/tensorflow.org/forum/#!topic/magenta-discuss/SCZR9qrQUGM

I have setup a magenta fork at

https://github.com/hpssjellis/magenta

PR's are welcome.

Bazel test failed on Ubuntu 16.04 LTS, Bazel 0.30

When I am following instructions on the README, when running

bazel test //magenta:all

it shows errors

WARNING: /home/private/.cache/bazel/_bazel_private/c45d77cbbbf828100c725e9c54fd2fa6/external/protobuf/WORKSPACE:1: Workspace name in /home/private/.cache/bazel/_bazel_private/c45d77cbbbf828100c725e9c54fd2fa6/external/protobuf/WORKSPACE (@__main__) does not match the name given in the repository's definition (@protobuf); this will cause a build error in future versions.
INFO: Found 5 targets and 6 test targets...
FAIL: //magenta:note_sequence_io_test (see /home/private/.cache/bazel/_bazel_private/c45d77cbbbf828100c725e9c54fd2fa6/execroot/magenta/bazel-out/local-opt/testlogs/magenta/note_sequence_io_test/test.log).
FAIL: //magenta:sequence_to_melodies_test (see /home/private/.cache/bazel/_bazel_private/c45d77cbbbf828100c725e9c54fd2fa6/execroot/magenta/bazel-out/local-opt/testlogs/magenta/sequence_to_melodies_test/test.log).
FAIL: //magenta:convert_midi_dir_to_note_sequences_test (see /home/private/.cache/bazel/_bazel_private/c45d77cbbbf828100c725e9c54fd2fa6/execroot/magenta/bazel-out/local-opt/testlogs/magenta/convert_midi_dir_to_note_sequences_test/test.log).
FAIL: //magenta:melodies_lib_test (see /home/private/.cache/bazel/_bazel_private/c45d77cbbbf828100c725e9c54fd2fa6/execroot/magenta/bazel-out/local-opt/testlogs/magenta/melodies_lib_test/test.log).
FAIL: //magenta:basic_one_hot_encoder_test (see /home/private/.cache/bazel/_bazel_private/c45d77cbbbf828100c725e9c54fd2fa6/execroot/magenta/bazel-out/local-opt/testlogs/magenta/basic_one_hot_encoder_test/test.log).
FAIL: //magenta:midi_io_test (see /home/private/.cache/bazel/_bazel_private/c45d77cbbbf828100c725e9c54fd2fa6/execroot/magenta/bazel-out/local-opt/testlogs/magenta/midi_io_test/test.log).
INFO: Elapsed time: 0.576s, Critical Path: 0.40s
//magenta:basic_one_hot_encoder_test                                     FAILED in 0.1s
  /home/private/.cache/bazel/_bazel_private/c45d77cbbbf828100c725e9c54fd2fa6/execroot/magenta/bazel-out/local-opt/testlogs/magenta/basic_one_hot_encoder_test/test.log
//magenta:convert_midi_dir_to_note_sequences_test                        FAILED in 0.1s
  /home/private/.cache/bazel/_bazel_private/c45d77cbbbf828100c725e9c54fd2fa6/execroot/magenta/bazel-out/local-opt/testlogs/magenta/convert_midi_dir_to_note_sequences_test/test.log
//magenta:melodies_lib_test                                              FAILED in 0.1s
  /home/private/.cache/bazel/_bazel_private/c45d77cbbbf828100c725e9c54fd2fa6/execroot/magenta/bazel-out/local-opt/testlogs/magenta/melodies_lib_test/test.log
//magenta:midi_io_test                                                   FAILED in 0.4s
  /home/private/.cache/bazel/_bazel_private/c45d77cbbbf828100c725e9c54fd2fa6/execroot/magenta/bazel-out/local-opt/testlogs/magenta/midi_io_test/test.log
//magenta:note_sequence_io_test                                          FAILED in 0.1s
  /home/private/.cache/bazel/_bazel_private/c45d77cbbbf828100c725e9c54fd2fa6/execroot/magenta/bazel-out/local-opt/testlogs/magenta/note_sequence_io_test/test.log
//magenta:sequence_to_melodies_test                                      FAILED in 0.1s
  /home/private/.cache/bazel/_bazel_private/c45d77cbbbf828100c725e9c54fd2fa6/execroot/magenta/bazel-out/local-opt/testlogs/magenta/sequence_to_melodies_test/test.log


Executed 6 out of 6 tests: 6 fail locally.

I have installed

sudo apt-get install openjdk-8-jdk

and Bazel 0.30, TensorFlow 0.9 (Anaconda-based) under Ubuntu 16.04 LTS

Magenta only reading example_complex.mid file not reading other midi files

I can't get any other mid files to run. Wondering if changes made 8 days ago to

https://github.com/tensorflow/magenta/blob/master/magenta/lib/sequence_to_melodies.py#L47

and other files have caused this issue.

My fresh installation sees all the sequences but only grabs the 9 melodies in the simple_complex.mid file. My output looks like

INFO:tensorflow:Extracting melodies...
INFO:tensorflow:Done. Extracted 9 melodies from 5 sequences.
INFO:tensorflow:Extracted 9 melodies for training.

FR: Allow splitting of GPU memory to prevent eval from failing

Feature Request:

Add the ability to set scaling of memory, possibly via command line:
gpu_options = tf.GPUOptions(per_process_gpu_memory_fraction = 0.5)

This is to allow you to run train and eval at the same time. Currently, I have found that eval will often fail with a 2gb 760GTX as it cannot obtain enough resources as train will take all available memory, throwing the cuBLAS error seen when the GPU is out of memory.

A workaround is to consume GPU memory before running train, then release the memory and hope it is enough for eval to start.

cuda tk 8.0 / cudnn 5.0.5

Output_file not found

When I tried to build a dataset I received the following error

File "/root/.cache/bazel/_bazel_root/cb5f479c6a7afa91f510d7ce625f6aa5/execroot/magenta/bazel-out/local-opt/bin/magenta/scripts/convert_midi_dir_to_note_sequences.runfiles/__main__/magenta/scripts/convert_midi_dir_to_note_sequences.py", line 118, in main
    os.makedirs(os.path.dirname(FLAGS.output_file))
  File "/usr/lib/python2.7/os.py", line 157, in makedirs
    mkdir(name, mode)
OSError: [Errno 2] No such file or directory: ''
ERROR: Non-zero return code '1' from command: Process exited with status 1.

The command I ran was

bazel run//magenta/scripts:convert_midi_dir_to_note_sequences -- \
--midi_dir=/magenta/midi  \
--output_file=/tmp/notesequences.tfrecord \
--recursive

I used my file path directly because I had an error running MIDI_DIRECTORY from docker which was that "MIDI_DIRECTORY command was not found". I am currently on windows 10 , Python 2.7, and installed magenta using docker as per the documentation on github.

pretty_midi missing from repo

I get this as an error when I attempt to import midi_io. Looking through both my local repo and the code hosted on github, it seems this dependency (pretty_midi) is not included? where can I find this library?

tf.contrib.layers.legacy_linear in basic_rnn_ops.py

after running:

bazel run //magenta:convert_sequences_to_melodies -- \
--input=$SEQUENCES_TFRECORD \
--train_output=$TRAIN_DATA \
--eval_output=$EVAL_DATA \
--eval_ratio=$EVAL_RATIO \
--encoder=$ENCODER

...which successfully outputs

INFO: Running command line: bazel-bin/magenta/convert_sequences_to_melodies '--input=/tmp/magentaOutput.tfrecord' '--train_output=/tmp/training_melodies.tfrecord' '--encoder=basic_one_hot_encoder'

Found 108 sequences

Extracted 361 melodies for training

I then built //magenta/models:basic_rnn_train and ran:

./bazel-bin/magenta/models/basic_rnn_train --experiment_run_dir=/tmp/
basic_rnn/run1 --sequence_example_file=/tmp/training_melodies.tfrecord --
eval=false --hparams='{"rnn_layer_sizes":[50]}' --num_training_steps=20000

but I'm getting a python error:

Dataset files: ['/tmp/training_melodies.tfrecord']

hparams = {'rnn_layer_sizes': [50], 'decay_steps': 1000, 'one_hot_length': 
38, 'batch_size': 128, 'decay_rate': 0.85, 'clip_norm': 5, 
'initial_learning_rate': 0.5, 'exponentially_decay_learning_rate': True, 
'lr': 0.0002, 'skip_first_n_losses': 32, 'l2_reg': 2.5e-05}

INFO:tensorflow:Created variable rnn_model/RNN/MultiRNNCell/Cell0/LSTMCell/
W_0:0 with shape (88, 200) and init <function _initializer at 0x10771caa0>

Created variable rnn_model/RNN/MultiRNNCell/Cell0/LSTMCell/W_0:0 with shape 
(88, 200) and init <function _initializer at 0x10771caa0>

INFO:tensorflow:Created variable rnn_model/RNN/MultiRNNCell/Cell0/LSTMCell/B
:0 with shape (200,) and init <function zeros_initializer at 0x106dbcf50>

Created variable rnn_model/RNN/MultiRNNCell/Cell0/LSTMCell/B:0 with shape (
200,) and init <function zeros_initializer at 0x106dbcf50>

Traceback (most recent call last):

  File 
"/Users/david/Development/magenta/bazel-bin/magenta/models/basic_rnn_train.runfiles/__main__/magenta/models/basic_rnn/basic_rnn_train.py"
, line 447, in <module>

    tf.app.run()

  File 
"/Users/david/anaconda/envs/tensorflow/lib/python2.7/site-packages/tensorflow/python/platform/app.py"
, line 30, in run

    sys.exit(main(sys.argv))

  File 
"/Users/david/Development/magenta/bazel-bin/magenta/models/basic_rnn_train.runfiles/__main__/magenta/models/basic_rnn/basic_rnn_train.py"
, line 420, in main

    hparams_string=FLAGS.hparams, is_eval_mode=FLAGS.eval)

  File 
"/Users/david/Development/magenta/bazel-bin/magenta/models/basic_rnn_train.runfiles/__main__/magenta/models/basic_rnn/basic_rnn_train.py"
, line 212, in make_graph

    parallel_iterations=1, swap_memory=True)

  File 
"/Users/david/Development/magenta/magenta/models/basic_rnn/basic_rnn_ops.py"
, line 177, in dynamic_rnn_inference

    logits_flat = tf.contrib.layers.legacy_linear(

AttributeError: 'module' object has no attribute 'legacy_linear'

Any clues?

Errors when running bazel tests

When I run the bazel tests, I get the following errors:

INFO: Found 45 targets and 10 test targets...
FAIL: //magenta/lib:midi_io_test (see /private/var/tmp/_bazel_jsawruk/e6e065222e08ffdd42d29a3881482d1d/execroot/magenta/bazel-out/local-opt/testlogs/magenta/lib/midi_io_test/test.log).
FAIL: //magenta/lib:melodies_lib_test (see /private/var/tmp/_bazel_jsawruk/e6e065222e08ffdd42d29a3881482d1d/execroot/magenta/bazel-out/local-opt/testlogs/magenta/lib/melodies_lib_test/test.log).
FAIL: //magenta/pipelines:pipelines_common_test (see /private/var/tmp/_bazel_jsawruk/e6e065222e08ffdd42d29a3881482d1d/execroot/magenta/bazel-out/local-opt/testlogs/magenta/pipelines/pipelines_common_test/test.log).
FAIL: //magenta/scripts:convert_midi_dir_to_note_sequences_test (see /private/var/tmp/_bazel_jsawruk/e6e065222e08ffdd42d29a3881482d1d/execroot/magenta/bazel-out/local-opt/testlogs/magenta/scripts/convert_midi_dir_to_note_sequences_test/test.log).
FAIL: //magenta/pipelines:dag_pipeline_test (see /private/var/tmp/_bazel_jsawruk/e6e065222e08ffdd42d29a3881482d1d/execroot/magenta/bazel-out/local-opt/testlogs/magenta/pipelines/dag_pipeline_test/test.log).
FAIL: //magenta/pipelines:pipeline_test (see /private/var/tmp/_bazel_jsawruk/e6e065222e08ffdd42d29a3881482d1d/execroot/magenta/bazel-out/local-opt/testlogs/magenta/pipelines/pipeline_test/test.log).
FAIL: //magenta/lib:note_sequence_io_test (see /private/var/tmp/_bazel_jsawruk/e6e065222e08ffdd42d29a3881482d1d/execroot/magenta/bazel-out/local-opt/testlogs/magenta/lib/note_sequence_io_test/test.log).
INFO: Elapsed time: 4.452s, Critical Path: 4.28s
//magenta/lib:sequences_lib_test                                (cached) PASSED in 2.0s
//magenta/models/shared:melody_rnn_create_dataset_test          (cached) PASSED in 2.6s
//magenta/pipelines:statistics_test                             (cached) PASSED in 3.3s
//magenta/lib:melodies_lib_test                                          FAILED in 2.3s
  /private/var/tmp/_bazel_jsawruk/e6e065222e08ffdd42d29a3881482d1d/execroot/magenta/bazel-out/local-opt/testlogs/magenta/lib/melodies_lib_test/test.log
//magenta/lib:midi_io_test                                               FAILED in 0.1s
  /private/var/tmp/_bazel_jsawruk/e6e065222e08ffdd42d29a3881482d1d/execroot/magenta/bazel-out/local-opt/testlogs/magenta/lib/midi_io_test/test.log
//magenta/lib:note_sequence_io_test                                      FAILED in 2.0s
  /private/var/tmp/_bazel_jsawruk/e6e065222e08ffdd42d29a3881482d1d/execroot/magenta/bazel-out/local-opt/testlogs/magenta/lib/note_sequence_io_test/test.log
//magenta/pipelines:dag_pipeline_test                                    FAILED in 2.5s
  /private/var/tmp/_bazel_jsawruk/e6e065222e08ffdd42d29a3881482d1d/execroot/magenta/bazel-out/local-opt/testlogs/magenta/pipelines/dag_pipeline_test/test.log
//magenta/pipelines:pipeline_test                                        FAILED in 2.6s
  /private/var/tmp/_bazel_jsawruk/e6e065222e08ffdd42d29a3881482d1d/execroot/magenta/bazel-out/local-opt/testlogs/magenta/pipelines/pipeline_test/test.log
//magenta/pipelines:pipelines_common_test                                FAILED in 2.3s
  /private/var/tmp/_bazel_jsawruk/e6e065222e08ffdd42d29a3881482d1d/execroot/magenta/bazel-out/local-opt/testlogs/magenta/pipelines/pipelines_common_test/test.log
//magenta/scripts:convert_midi_dir_to_note_sequences_test                FAILED in 2.4s
  /private/var/tmp/_bazel_jsawruk/e6e065222e08ffdd42d29a3881482d1d/execroot/magenta/bazel-out/local-opt/testlogs/magenta/scripts/convert_midi_dir_to_note_sequences_test/test.log

Executed 7 out of 10 tests: 3 tests pass and 7 fail locally.
There were tests whose specified size is too big. Use the --test_verbose_timeout_warnings command line option to see which ones these are.

I am on OS X 10.11.6, Python 3.5.2, and installed bazel with brew and TensorFlow with pip3.

basic_rnn readme filename issue

The initial training and eval dataset script defines the output as /tmp/training_melodies.tfrecord and /tmp/evaluation_melodies.tfrecord respectively. The readme then inaccurately references these files under "Running training in depth" as /tmp/train_melodies.tfrecord and /tmp/eval_melodies.tfrecord. Readme should be updated for consistent filenames.

midi_io.py sometimes mistakes a drum MIDI track for a non-drum MIDI track.

We rely on the instrument id to decide whether or not an event should be routed to a drum channel when a MIDI file is reconstructed.
https://github.com/tensorflow/magenta/blob/master/magenta/lib/midi_io.py#L228
When MIDI files have multiple tracks with channel-9 events (drum events) those tracks may get reset to a different channel when reconstructed. We need to store the pretty_midi "is_drum" attribute in the NoteSequence proto to fix this.

Fix coming soon.

Tests failing with Bazel 0.2.3 and Tensorflow 0.9

Hey all!

I'm on a Mac OSX attempting to build. I installed tensorflow in python 3. When I run the

bazel test //magenta:all

Command, all 6 tests fail locally. The fail log for each says that python can't import tensorflow. I'm assuming the tests are being run by my Mac's default python automatically (2.7.10, doesn't have tensorflow installed), is there a way to change that to python3?

Sorry if this is a dumb question!

OS X: convert_midi_dir_to_note_sequences failed with "no attribute 'DEFINE_bool'"

I'm running OS X, El Capitan (10.11.5), installed Tensorflow (Virtualenv install) and Bazel, python version 2.7.9.

I ran and got error as below.

➜ magenta git:(master) ✗ bazel run //magenta/scripts:convert_midi_dir_to_note_sequences --
--midi_dir=$MIDI_DIRECTORY
--output_file=$SEQUENCES_TFRECORD
--recursive
WARNING: /private/var/tmp/_bazel_DN/5851cd3d56588703b71adf0453827105/external/protobuf/WORKSPACE:1: Workspace name in /private/var/tmp/_bazel_DN/5851cd3d56588703b71adf0453827105/external/protobuf/WORKSPACE (@main) does not match the name given in the repository's definition (@protobuf); this will cause a build error in future versions.
INFO: Found 1 target...
Target //magenta/scripts:convert_midi_dir_to_note_sequences up-to-date:
bazel-bin/magenta/scripts/convert_midi_dir_to_note_sequences
INFO: Elapsed time: 0.191s, Critical Path: 0.00s

INFO: Running command line: bazel-bin/magenta/scripts/convert_midi_dir_to_note_sequences '--midi_dir=/Users/DnMac/Documents/song/magenta/magenta/music' '--output_file=/tmp/notesequences.tfrecord' --recursive
Traceback (most recent call last):
File "/private/var/tmp/_bazel_DN/5851cd3d56588703b71adf0453827105/execroot/magenta/bazel-out/local-opt/bin/magenta/scripts/convert_midi_dir_to_note_sequences.runfiles/main/magenta/scripts/convert_midi_dir_to_note_sequences.py", line 40, in
tf.app.flags.DEFINE_bool('recursive', False,
AttributeError: 'module' object has no attribute 'DEFINE_bool'
ERROR: Non-zero return code '1' from command: Process exited with status 1.

Perhaps something wrong with gflags? But I installed gflags with brew again. It still doesn't work. Any suggestion? Thanks!

protobuf issue

Hello, I installed bazel (3.1) and tensorflow in a conda environment, but, every time I try to run any of the scripts (bazel test/bazel run) I get the following error message :/home/ubuntu/magenta/magenta/lib/BUILD:49:1: error loading package 'ma genta/protobuf': Encountered error while reading extension file 'protobuf.bzl ': no such package '@protobuf//': Error cloning repository: https://github.co m/google/protobuf: cannot open git-upload-pack caused by https://github.com/g oogle/protobuf: cannot open git-upload-pack caused by sun.security.validator. ValidatorException: PKIX path building failed: sun.security.provider.certpath .SunCertPathBuilderException: unable to find valid certification path to requ ested target caused by PKIX path building failed: sun.security.provider.certp ath.SunCertPathBuilderException: unable to find valid certification path to r equested target caused by unable to find valid certification path to requeste d target and referenced by '//magenta/lib:midi_io'.

I noticed it appeared in another thread, I tried running bazel 0.23, reinstalling different versions of tensorflow and also installed tensorflow in a conda environment, but so far no luck

ERROR: no such target '//magenta:convert_midi_dir_to_note_sequences'

$ sh createSequence.sh
ERROR: no such target '//magenta:convert_midi_dir_to_note_sequences': target 'convert_midi_dir_to_note_sequences' not declared in package 'magenta' defined by /home/oatmeal/HiMusic/magenta/magenta/BUILD.
INFO: Elapsed time: 0.154s
ERROR: Build failed. Not running target.

oatmeal@oatmeal-ThinkPad-X240:~/HiMusic/magenta$ cat createSequence.sh
MIDI_DIRECTORY=/home/oatmeal/HiMusic/MIDI/Dance
SEQUENCES_TFRECORD=/tmp/Dance_sequences.tfrecord

bazel run //magenta:convert_midi_dir_to_note_sequences --
--midi_dir=$MIDI_DIRECTORY
--output_file=$SEQUENCES_TFRECORD
--recursive

Enhancement: Functionality to restart a training run from a specific or the last checkpoint.

Best explained at this Google Groups Magenta Discus link

https://groups.google.com/a/tensorflow.org/d/msg/magenta-discuss/naLLtfCCjQM/R_Ho4FJZBQAJ

If your last checkpoint was at 1000 interations and you wanted to continue to 2000 iterations, the following code is Tensorflow style but does not work

TRAIN_DATA=/tmp/training_melodies.tfrecord

CHECKPOINT_DATA=basic_rnn.ckpt-1000

./bazel-bin/magenta/models/basic_rnn_train --experiment_run_dir=/tmp/basic_rnn/run1 --sequence_example_file=$TRAIN_DATA --eval=false --hparams='{"rnn_layer_sizes".[50],“model_checkpoint_path”:[$CHECKPOINT_DATA]}' --num_training_steps=2000

training stop

Training loop stop.

I set num_training_steps=20000 but Training stop when 10 steps.

OS is Ubuntu 64bit. and tensorflow is without GPU.

When this issue occured, I used ten eagles midi file of this site(http://www.midiworld.com/files/142/).
The_Eagles_-Best_of_My_Love.mid,The_Eagles-Desperado.mid.The_Eagles-Heartache_Tonight.mid,The_Eagles-One_of_These_Nights.mid,The_Eagles-Pretty_Maids_All_In_A_Row.mid,The_Eagles-Take_It_Easy.mid,The_Eagles-Take_It_To_The_Limit.mid,The_Eagles-The_Last_Resort.mid,The_Eagles-Try_And_Love_Again.mid,The_Eagles-_Wasted_Time.mid

terminal


Starting training loop
Wrote checkpoint to /tmp/basic_rnn/run1/train/basic_rnn.ckpt-10
Global Step: 10 - Loss: 290226.031 - Log-perplexity: 1.277 - Step Accuracy: 0.79 - Avg Accuracy (last 20 summaries): 0.74 - Learning Rate: 0.500000
(tensorflow)marshi@ubuntu:~/Desktop/magenta


Thank you

basic_rnn_train: No module named lib

Getting this error when I try to run basic_rnn_train:
Traceback (most recent call last): File "/home/alex/magenta/bazel-bin/magenta/models/basic_rnn_train.runfiles/__main__/magenta/models/basic_rnn/basic_rnn_train.py", line 36, in <module> import basic_rnn_encoder_decoder File "/home/alex/magenta/magenta/models/basic_rnn/basic_rnn_encoder_decoder.py", line 17, in <module> from magenta.lib import melodies_lib ImportError: No module named lib

I cannot run the tests with bazel before using Magenta

I wanted to run the following command properly: bazel test //magenta/...

However, I got the following back after installing bazel and tensorflow...

Shyamals-iMac-174:~ shyamalchandra$ bazel test //magenta/...
The 'test' command is only supported from within a workspace.

How do I solve this problem?

Error on initial test.

Hi,
I'm having a problem running the initial test.
(python 2.7.12 / tensorflow 0.9.0 / OSX 10.11.6)

Executing the following code from the instruction,
bazel test //magenta/...

I get these error messages. :

WARNING: /private/var/tmp/_bazel_kaka/d3542784be43f5a4052aba9655d0cf38/external/protobuf/WORKSPACE:1: Workspace name in /private/var/tmp/_bazel_kaka/d3542784be43f5a4052aba9655d0cf38/external/protobuf/WORKSPACE (@__main__) does not match the name given in the repository's definition (@protobuf); this will cause a build error in future versions.
INFO: Found 45 targets and 10 test targets...
FAIL: //magenta/lib:note_sequence_io_test (see /private/var/tmp/_bazel_kaka/d3542784be43f5a4052aba9655d0cf38/magenta/bazel-out/local-opt/testlogs/magenta/lib/note_sequence_io_test/test.log).
FAIL: //magenta/pipelines:pipeline_test (see /private/var/tmp/_bazel_kaka/d3542784be43f5a4052aba9655d0cf38/magenta/bazel-out/local-opt/testlogs/magenta/pipelines/pipeline_test/test.log).
FAIL: //magenta/scripts:convert_midi_dir_to_note_sequences_test (see /private/var/tmp/_bazel_kaka/d3542784be43f5a4052aba9655d0cf38/magenta/bazel-out/local-opt/testlogs/magenta/scripts/convert_midi_dir_to_note_sequences_test/test.log).
INFO: Elapsed time: 1.181s, Critical Path: 0.76s
//magenta/lib:melodies_lib_test                                 (cached) PASSED in 1.1s
//magenta/lib:midi_io_test                                      (cached) PASSED in 2.1s
//magenta/lib:sequences_lib_test                                (cached) PASSED in 1.0s
//magenta/models/shared:melody_rnn_create_dataset_test          (cached) PASSED in 1.0s
//magenta/pipelines:dag_pipeline_test                           (cached) PASSED in 1.0s
//magenta/pipelines:pipelines_common_test                       (cached) PASSED in 1.0s
//magenta/pipelines:statistics_test                             (cached) PASSED in 1.0s
//magenta/lib:note_sequence_io_test                                      FAILED in 0.6s
  /private/var/tmp/_bazel_kaka/d3542784be43f5a4052aba9655d0cf38/magenta/bazel-out/local-opt/testlogs/magenta/lib/note_sequence_io_test/test.log
//magenta/pipelines:pipeline_test                                        FAILED in 0.7s
  /private/var/tmp/_bazel_kaka/d3542784be43f5a4052aba9655d0cf38/magenta/bazel-out/local-opt/testlogs/magenta/pipelines/pipeline_test/test.log
//magenta/scripts:convert_midi_dir_to_note_sequences_test                FAILED in 0.8s
  /private/var/tmp/_bazel_kaka/d3542784be43f5a4052aba9655d0cf38/magenta/bazel-out/local-opt/testlogs/magenta/scripts/convert_midi_dir_to_note_sequences_test/test.log

Executed 3 out of 10 tests: 7 tests pass and 3 fail locally.
There were tests whose specified size is too big. Use the --test_verbose_timeout_warnings command line option to see which ones these are.

With the suggested option(--test_verbose_timeout_warnings), here are the error messages.

bazel test //magenta/... --test_verbose_timeout_warnings

WARNING: /private/var/tmp/_bazel_kaka/d3542784be43f5a4052aba9655d0cf38/external/protobuf/WORKSPACE:1: Workspace name in /private/var/tmp/_bazel_kaka/d3542784be43f5a4052aba9655d0cf38/external/protobuf/WORKSPACE (@__main__) does not match the name given in the repository's definition (@protobuf); this will cause a build error in future versions.
INFO: Found 45 targets and 10 test targets...
FAIL: //magenta/lib:note_sequence_io_test (see /private/var/tmp/_bazel_kaka/d3542784be43f5a4052aba9655d0cf38/magenta/bazel-out/local-opt/testlogs/magenta/lib/note_sequence_io_test/test.log).
FAIL: //magenta/pipelines:pipeline_test (see /private/var/tmp/_bazel_kaka/d3542784be43f5a4052aba9655d0cf38/magenta/bazel-out/local-opt/testlogs/magenta/pipelines/pipeline_test/test.log).
FAIL: //magenta/scripts:convert_midi_dir_to_note_sequences_test (see /private/var/tmp/_bazel_kaka/d3542784be43f5a4052aba9655d0cf38/magenta/bazel-out/local-opt/testlogs/magenta/scripts/convert_midi_dir_to_note_sequences_test/test.log).
INFO: Elapsed time: 1.193s, Critical Path: 0.74s
//magenta/lib:melodies_lib_test                                 (cached) PASSED in 1.1s
  WARNING: //magenta/lib:melodies_lib_test: Test execution time (0.0s excluding execution overhead) outside of range for MODERATE tests. Consider setting timeout="short" or size="small".
//magenta/lib:midi_io_test                                      (cached) PASSED in 2.1s
  WARNING: //magenta/lib:midi_io_test: Test execution time (0.0s excluding execution overhead) outside of range for MODERATE tests. Consider setting timeout="short" or size="small".
//magenta/lib:sequences_lib_test                                (cached) PASSED in 1.0s
  WARNING: //magenta/lib:sequences_lib_test: Test execution time (0.0s excluding execution overhead) outside of range for MODERATE tests. Consider setting timeout="short" or size="small".
//magenta/models/shared:melody_rnn_create_dataset_test          (cached) PASSED in 1.0s
  WARNING: //magenta/models/shared:melody_rnn_create_dataset_test: Test execution time (0.0s excluding execution overhead) outside of range for MODERATE tests. Consider setting timeout="short" or size="small".
//magenta/pipelines:dag_pipeline_test                           (cached) PASSED in 1.0s
  WARNING: //magenta/pipelines:dag_pipeline_test: Test execution time (0.0s excluding execution overhead) outside of range for MODERATE tests. Consider setting timeout="short" or size="small".
//magenta/pipelines:pipelines_common_test                       (cached) PASSED in 1.0s
  WARNING: //magenta/pipelines:pipelines_common_test: Test execution time (0.0s excluding execution overhead) outside of range for MODERATE tests. Consider setting timeout="short" or size="small".
//magenta/pipelines:statistics_test                             (cached) PASSED in 1.0s
  WARNING: //magenta/pipelines:statistics_test: Test execution time (0.0s excluding execution overhead) outside of range for MODERATE tests. Consider setting timeout="short" or size="small".
//magenta/lib:note_sequence_io_test                                      FAILED in 0.6s
  /private/var/tmp/_bazel_kaka/d3542784be43f5a4052aba9655d0cf38/magenta/bazel-out/local-opt/testlogs/magenta/lib/note_sequence_io_test/test.log
//magenta/pipelines:pipeline_test                                        FAILED in 0.7s
  /private/var/tmp/_bazel_kaka/d3542784be43f5a4052aba9655d0cf38/magenta/bazel-out/local-opt/testlogs/magenta/pipelines/pipeline_test/test.log
//magenta/scripts:convert_midi_dir_to_note_sequences_test                FAILED in 0.7s
  /private/var/tmp/_bazel_kaka/d3542784be43f5a4052aba9655d0cf38/magenta/bazel-out/local-opt/testlogs/magenta/scripts/convert_midi_dir_to_note_sequences_test/test.log

Executed 3 out of 10 tests: 7 tests pass and 3 fail locally.

And here are the 3 test.log files.

exec ${PAGER:-/usr/bin/less} "$0" || exit 1
-----------------------------------------------------------------------------
.E.
======================================================================
ERROR: testNoteSequenceRecordWriterAndIterator (__main__.NoteSequenceIoTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/private/var/tmp/_bazel_kaka/d3542784be43f5a4052aba9655d0cf38/magenta/bazel-out/local-opt/bin/magenta/lib/note_sequence_io_test.runfiles/__main__/magenta/lib/note_sequence_io_test.py", line 52, in testNoteSequenceRecordWriterAndIterator
    writer.write(sequence)
AttributeError: 'NoneType' object has no attribute 'write'

----------------------------------------------------------------------
Ran 3 tests in 0.010s

FAILED (errors=1)
exec ${PAGER:-/usr/bin/less} "$0" || exit 1
-----------------------------------------------------------------------------
Traceback (most recent call last):
  File "/private/var/tmp/_bazel_kaka/d3542784be43f5a4052aba9655d0cf38/magenta/bazel-out/local-opt/bin/magenta/scripts/convert_midi_dir_to_note_sequences_test.runfiles/__main__/magenta/scripts/convert_midi_dir_to_note_sequences_test.py", line 23, in <module>
    from magenta.scripts import convert_midi_dir_to_note_sequences
  File "/private/var/tmp/_bazel_kaka/d3542784be43f5a4052aba9655d0cf38/magenta/bazel-out/local-opt/bin/magenta/scripts/convert_midi_dir_to_note_sequences_test.runfiles/__main__/magenta/scripts/convert_midi_dir_to_note_sequences.py", line 40, in <module>
    tf.app.flags.DEFINE_bool('recursive', False,
AttributeError: 'module' object has no attribute 'DEFINE_bool'
exec ${PAGER:-/usr/bin/less} "$0" || exit 1
-----------------------------------------------------------------------------
EE.........
======================================================================
ERROR: testFileIteratorNotRecursive (__main__.PipelineTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/private/var/tmp/_bazel_kaka/d3542784be43f5a4052aba9655d0cf38/magenta/bazel-out/local-opt/bin/magenta/pipelines/pipeline_test.runfiles/__main__/magenta/pipelines/pipeline_test.py", line 89, in testFileIteratorNotRecursive
    tf.gfile.MakeDirs(os.path.dirname(abs_path))
  File "/Library/Python/2.7/site-packages/tensorflow/python/platform/default/_gfile.py", line 294, in MakeDirs
    os.makedirs(path, mode)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/os.py", line 157, in makedirs
    mkdir(name, mode)
OSError: [Errno 17] File exists: '/var/folders/ft/pglvm7vd2z314vmrkkrqgsc40000gn/T/pipeline_test/tmpXijx5Y'

======================================================================
ERROR: testFileIteratorRecursive (__main__.PipelineTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/private/var/tmp/_bazel_kaka/d3542784be43f5a4052aba9655d0cf38/magenta/bazel-out/local-opt/bin/magenta/pipelines/pipeline_test.runfiles/__main__/magenta/pipelines/pipeline_test.py", line 65, in testFileIteratorRecursive
    tf.gfile.MakeDirs(os.path.dirname(abs_path))
  File "/Library/Python/2.7/site-packages/tensorflow/python/platform/default/_gfile.py", line 294, in MakeDirs
    os.makedirs(path, mode)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/os.py", line 157, in makedirs
    mkdir(name, mode)
OSError: [Errno 17] File exists: '/var/folders/ft/pglvm7vd2z314vmrkkrqgsc40000gn/T/pipeline_test/tmpviHWZd'

----------------------------------------------------------------------
Ran 11 tests in 0.042s

FAILED (errors=2)

Could anyone give me an advice?

Non-zero return code '245'

$ sh createSequence.sh
WARNING: /home/oatmeal/.cache/bazel/_bazel_oatmeal/c3300a0566708e561674ab71c996c139/external/protobuf/WORKSPACE:1: Workspace name in /home/oatmeal/.cache/bazel/_bazel_oatmeal/c3300a0566708e561674ab71c996c139/external/protobuf/WORKSPACE (@main) does not match the name given in the repository's definition (@protobuf); this will cause a build error in future versions.
INFO: Found 1 target...
Target //magenta/scripts:convert_midi_dir_to_note_sequences up-to-date:
bazel-bin/magenta/scripts/convert_midi_dir_to_note_sequences
INFO: Elapsed time: 0.185s, Critical Path: 0.00s

INFO: Running command line: bazel-bin/magenta/scripts/convert_midi_dir_to_note_sequences '--midi_dir=/home/oatmeal/HiMusic/MIDI/Dance' '--output_file=/home/oatmeal/HiMusic/Output/Dance_sequences.tfrecord' --recursive
ERROR: Non-zero return code '245' from command: Process exited with status 245.

"Extracted 0 melodies from 0 sequences."

I'm not seeing any success trying to create a dataset from note sequence data. After successfully creating a notesequences.tfrecord file, every time I try to use it to create a dataset with basic_rnn_create_dataset.py, I see the following:

INFO:tensorflow:Extracting melodies...
INFO:tensorflow:Done. Extracted 0 melodies from 0 sequences.
INFO:tensorflow:Extracted 0 melodies for training.
INFO:tensorflow:Extracted 0 melodies for evaluation.

No training_melodies.tfrecord is being created.

Here is (a) my script to generate note sequences, then (b) my script to generate a dataset. I've tried with many different MIDI files (ensuring that no errors arise when creating note sequences):

(a)

MIDI_DIRECTORY=/Users/paulosetinsky/ai/midi_files/bach
SEQUENCES_TFRECORD=/Users/paulosetinsky/ai/magenta/tmp/notesequences.tfrecord

bazel run //magenta/scripts:convert_midi_dir_to_note_sequences -- \
--midi_dir=$MIDI_DIRECTORY \
--output_file=$SEQUENCES_TFRECORD \
--recursive

(b)


# TFRecord file containing NoteSequence protocol buffers from convert_midi_dir_to_note_sequences.py.
SEQUENCES_TFRECORD=/tmp/notesequences.tfrecord

# TFRecord file that TensorFlow's SequenceExample protos will be written to. This is the training dataset.
TRAIN_DATA=/tmp/basic_rnn/sequence_examples/training_melodies.tfrecord

# Optional evaluation dataset. Also, a TFRecord file containing SequenceExample protos.
EVAL_DATA=/tmp/basic_rnn/sequence_examples/eval_melodies.tfrecord

# Fraction of input data that will be written to the eval dataset (if eval_output flag is set).
EVAL_RATIO=0.10

bazel run //magenta/models/basic_rnn:basic_rnn_create_dataset -- \
--input=$SEQUENCES_TFRECORD \
--train_output=$TRAIN_DATA \
--eval_output=$EVAL_DATA \
--eval_ratio=$EVAL_RATIO

I'd appreciate any ideas on why no melodies can be extracted (and why no sequences are being detected)!

Just cannot create SequenceExamples

When I want to create SequenceExamples from notesequences.tfrecord, message like this occurs:

INFO:tensorflow:Processed 1 inputs total. Produced 0 outputs.

Besides, the SequenceExample files' sizes are zero.

qq 20160814174942

This is my notesequences.tfrecord file created from bach's Goldberg Variations:

qq 20160814175316

Error:Follow with readme, can't build dataset

I'm using my mac pro with OS X EI Capitan version 10.11.4 and following with the tutorial in readme. My tensorflow is version 0.10
But when I want to build the dataset, it always fails with log info below:

INFO: Found 1 target...
Target //magenta/scripts:convert_midi_dir_to_note_sequences up-to-date:
  bazel-bin/magenta/scripts/convert_midi_dir_to_note_sequences
INFO: Elapsed time: 0.324s, Critical Path: 0.00s

INFO: Running command line: bazel-bin/magenta/scripts/convert_midi_dir_to_note_sequences '--midi_dir=/Users/Patient/tensorflow/magenta/midi' '--output_file=/tmp/notesequences.tfrecord' --recursive
Traceback (most recent call last):
  File "/private/var/tmp/_bazel_Patient/672c0c4b53120b3038ed587d17172b35/magenta/bazel-out/local_darwin-opt/bin/magenta/scripts/convert_midi_dir_to_note_sequences.runfiles/magenta/scripts/convert_midi_dir_to_note_sequences.py", line 30, in <module>
    from magenta.lib import midi_io
  File "/private/var/tmp/_bazel_Patient/672c0c4b53120b3038ed587d17172b35/magenta/bazel-out/local_darwin-opt/bin/magenta/scripts/convert_midi_dir_to_note_sequences.runfiles/magenta/lib/midi_io.py", line 29, in <module>
    import pretty_midi
  File "/private/var/tmp/_bazel_Patient/672c0c4b53120b3038ed587d17172b35/magenta/bazel-out/local_darwin-opt/bin/magenta/scripts/convert_midi_dir_to_note_sequences.runfiles/external/pretty_midi/pretty_midi.py", line 12, in <module>
    from .instrument import Instrument
ValueError: Attempted relative import in non-package
ERROR: Non-zero return code '1' from command: Process exited with status 1.

What's more, I run the tests which fails as well:

//magenta/lib:melodies_lib_test                                 (cached) PASSED in 4.5s
//magenta/lib:note_sequence_io_test                             (cached) PASSED in 4.1s
//magenta/lib:sequences_lib_test                                (cached) PASSED in 3.6s
//magenta/models/shared:melody_rnn_create_dataset_test          (cached) PASSED in 2.1s
//magenta/pipelines:dag_pipeline_test                           (cached) PASSED in 3.3s
//magenta/pipelines:pipeline_test                               (cached) PASSED in 3.2s
//magenta/pipelines:pipelines_common_test                       (cached) PASSED in 3.2s
//magenta/pipelines:statistics_test                             (cached) PASSED in 3.2s
//magenta/lib:midi_io_test                                               FAILED in 0.6s
  /private/var/tmp/_bazel_Patient/672c0c4b53120b3038ed587d17172b35/magenta/bazel-out/local_darwin-opt/testlogs/magenta/lib/midi_io_test/test.log
//magenta/scripts:convert_midi_dir_to_note_sequences_test                FAILED in 3.4s
  /private/var/tmp/_bazel_Patient/672c0c4b53120b3038ed587d17172b35/magenta/bazel-out/local_darwin-opt/testlogs/magenta/scripts/convert_midi_dir_to_note_sequences_test/test.log

Executed 2 out of 10 tests: 8 tests pass and 2 fail locally.

OS X: tests failing with "unrecognized command line option"

I'm running OS X, El Capitan (10.11.5) with MacPorts. Installed Tensorflow a couple months ago.

Tonight I installed bazel via the binary installer. Then ran...

bash-3.2$ bazel test //magenta:all
WARNING: /private/var/tmp/_bazel_myusername/ddd9d9dc1e025ace939596b3e248324a/external/protobuf/WORKSPACE:1: Workspace name in /private/var/tmp/_bazel_myusername/ddd9d9dc1e025ace939596b3e248324a/external/protobuf/WORKSPACE (@__main__) does not match the name given in the repository's definition (@protobuf); this will cause a build error in future versions.
INFO: Found 9 targets and 6 test targets...
ERROR: /private/var/tmp/_bazel_myusername/ddd9d9dc1e025ace939596b3e248324a/external/protobuf/BUILD:228:1: C++ compilation of rule '@protobuf//:protoc_lib' failed: cc_wrapper.sh failed: error executing command external/local_config_cc/cc_wrapper.sh -U_FORTIFY_SOURCE '-D_FORTIFY_SOURCE=1' -fstack-protector -Wall -Wthread-safety -Wself-assign -Wno-free-nonheap-object -fno-omit-frame-pointer -g0 -O2 -DNDEBUG ... (remaining 36 argument(s) skipped): com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 1.
cc1plus: error: unrecognized command line option "-Wthread-safety"
cc1plus: error: unrecognized command line option "-Wself-assign"
cc1plus: warning: unrecognized command line option "-Wno-free-nonheap-object"
INFO: Elapsed time: 4.480s, Critical Path: 1.87s
//magenta:basic_one_hot_encoder_test                                  NO STATUS
//magenta:convert_midi_dir_to_note_sequences_test                     NO STATUS
//magenta:melodies_lib_test                                           NO STATUS
//magenta:midi_io_test                                                NO STATUS
//magenta:note_sequence_io_test                                       NO STATUS
//magenta:sequence_to_melodies_test                                   NO STATUS

Executed 0 out of 6 tests: 6 were skipped.
bash-3.2$ 

Any suggestions? Perhaps it's some kind of compiler mismatch? Usually, build scripts will pull from the environment to use the MacPorts compilers, but the default 'gcc' just points to Apple's...

bash-3.2$ which gcc
/Applications/XCode.app/Contents/Developer/usr/bin/gcc
bash-3.2$ set | grep CC
CC=/opt/local/bin/gcc-mp-4.4
bash-3.2$ set | grep CXX
CXX=/opt/local/bin/g++-mp-4.4

Thanks.

sequences_lib_test fails due to changes in #128

When I sync to before that commit, I don't get this error.

-----------------------------------------------------------------------------
...F.
======================================================================
FAIL: testRounding (__main__.SequencesLibTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/private/var/tmp/_bazel_fjord/3a91f53e6b33bd607d259769ba3548d4/magenta/bazel-out/local-opt/bin/magenta/lib/sequences_lib_test.runfiles/__main__/magenta/lib/sequences_lib_test.py", line 93, in testRounding
    self.assertEqual(self.expected_quantized_sequence, quantized)
AssertionError: <magenta.lib.sequences_lib.QuantizedSequence object at 0x113768950> != <magenta.lib.sequences_lib.QuantizedSequence object at 0x113768990>

----------------------------------------------------------------------
Ran 5 tests in 0.003s

FAILED (failures=1)

Midi decoding error: Bad header in MIDI file

By following the tutorial, when converting midi files to note sequences, it encounters following error

ERROR:tensorflow:Midi decoding error <type 'exceptions.TypeError'>: Bad header in MIDI file

when running

bazel run //magenta/scripts:convert_midi_dir_to_note_sequences -- \
--midi_dir=$MIDI_DIRECTORY \
--output_file=$SEQUENCES_TFRECORD \
--recursive

No tfrecord file generated.

I've tried many different midi files from midiworld website, the same error remains. So I guess it might not be the problem with midi files.

Environment:
Bazel 0.30
TensorFlow 0.9 under virtual environment

No output about sequenced midi files

Anyone else having this issue?

Everything seems to work fine except my output used to give me some indication about the midi files that have been processed,

I used to see something like:

INFO: found 9 melodies in 3 sequences.

Basic RNN training takes a very long time

I just wanted to make sure this is expected given a set of 10 (polyphonic) midi files. Running through the README step by step, so just wanted to make sure nothing is off.

notesequences.tfrecord generates fine, but when I use that file for training in the steps linked below, something seems to hang:

https://github.com/tensorflow/magenta/blob/master/magenta/models/basic_rnn/README.md#running-training-in-depth

Using defaults of 50 nn layers and 20000 training steps. Decreasing the training steps to just 20 still takes all day, though I've never let it run to completion out of impatience.

Running MacBook Air, 1.7GHz with 8GB of memory. Thanks for any feedback!

Error when building with primer.mid

I'm getting this when generating the melody with primer.mid

Traceback (most recent call last):
  File "..../ec4a1d0982b871d144edb5a331b7959f/execroot/magenta/bazel-out/local-opt/bin/magenta/models/basic_rnn_generate.runfiles/__main__/magenta/models/basic_rnn/basic_rnn_generate.py", line 275, in <module>
    tf.app.run()
  File ".../tensorflow/local/lib/python2.7/site-packages/tensorflow/python/platform/app.py", line 30, in run
    sys.exit(main(sys.argv))
  File ".../ec4a1d0982b871d144edb5a331b7959f/execroot/magenta/bazel-out/local-opt/bin/magenta/models/basic_rnn_generate.runfiles/__main__/magenta/models/basic_rnn/basic_rnn_generate.py", line 263, in main
    FLAGS.num_steps))
  File ".../ec4a1d0982b871d144edb5a331b7959f/execroot/magenta/bazel-out/local-opt/bin/magenta/models/basic_rnn_generate.runfiles/__main__/magenta/models/basic_rnn/basic_rnn_generate.py", line 184, in sampler_loop
    saver.restore(session, checkpoint_file)
  File "..../tensorflow/local/lib/python2.7/site-packages/tensorflow/python/training/saver.py", line 1102, in restore
    if not pywrap_tensorflow.get_matching_files(save_path):
  File "..../tensorflow/local/lib/python2.7/site-packages/tensorflow/python/pywrap_tensorflow.py", line 379, in get_matching_files
    return GetMatchingFiles(compat.as_bytes(filename), status)
  File "/...python2.7/site-packages/tensorflow/python/util/compat.py", line 44, in as_bytes
    raise TypeError('Expected binary or unicode string, got %r' % bytes_or_text)
TypeError: Expected binary or unicode string, got None
ERROR: Non-zero return code '1' from command: Process exited with status 1.

Not compatible with Bazel 0.3.0

ERROR: /private/var/tmp/_bazel_adarob/c46465c5b0364556ead90788d0a8e892/external/pretty_midi/BUILD:1:1: no such package '@midi//': Error extracting /private/var/tmp/_bazel_adarob/c46465c5b0364556ead90788d0a8e892/external/midi/4b7a229f6b340e7424c1fccafa9ac543b9b3d605.zip to /private/var/tmp/_bazel_adarob/c46465c5b0364556ead90788d0a8e892/external/midi: Zip entries cannot be symlinks to absolute paths: 4b7a229f6b340e7424c1fccafa9ac543b9b3d605.zip has a symlink to /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/CoreMIDI.framework and referenced by '@pretty_midi//:pretty_midi'.

Unicode error when trying to run basic rnn training

On Ubuntu 16.04 no GPU, I followed the instructions to create MIDI note sequences with these MIDI files:dkc2.zip saved in /tmp/vgnotesequences2.tfrecord. Then ran the command

./bazel-bin/magenta/models/basic_rnn_train --experiment_run_dir=/tmp/basic_rnn/run1 --sequence_example_file=/tmp/vgnotesequences2.tfrecord --eval=false --hparams='{"rnn_layer_sizes":[50]}' --num_training_steps=20000

And ended up with this error:

INFO:tensorflow:Error reported to Coordinator: <type 'exceptions.UnicodeDecodeError'>, 'utf8' codec can't decode byte 0xed in position 143: invalid continuation byte Error reported to Coordinator: <type 'exceptions.UnicodeDecodeError'>, 'utf8' codec can't decode byte 0xed in position 143: invalid continuation byte Got error reported to coordinator: PaddingFIFOQueue '_1_rnn_model/padding_fifo_queue' is closed and has insufficient elements (requested 128, current size 0) [[Node: rnn_model/padding_fifo_queue_DequeueMany = QueueDequeueMany[_class=["loc:@rnn_model/padding_fifo_queue"], component_types=[DT_FLOAT, DT_INT64, DT_INT32], timeout_ms=-1, _device="/job:localhost/replica:0/task:0/cpu:0"](rnn_model/padding_fifo_queue, rnn_model/padding_fifo_queue_DequeueMany/n)]] Caused by op u'rnn_model/padding_fifo_queue_DequeueMany', defined at: File "/home/alex/magenta/bazel-bin/magenta/models/basic_rnn_train.runfiles/__main__/magenta/models/basic_rnn/basic_rnn_train.py", line 449, in <module> tf.app.run() File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/platform/app.py", line 30, in run sys.exit(main(sys.argv)) File "/home/alex/magenta/bazel-bin/magenta/models/basic_rnn_train.runfiles/__main__/magenta/models/basic_rnn/basic_rnn_train.py", line 422, in main hparams_string=FLAGS.hparams, is_eval_mode=FLAGS.eval) File "/home/alex/magenta/bazel-bin/magenta/models/basic_rnn_train.runfiles/__main__/magenta/models/basic_rnn/basic_rnn_train.py", line 203, in make_graph lengths) = basic_rnn_ops.dynamic_rnn_batch(file_list, hparams) File "/home/alex/magenta/magenta/models/basic_rnn/basic_rnn_ops.py", line 125, in dynamic_rnn_batch return queue.dequeue_many(hparams.batch_size) File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/data_flow_ops.py", line 434, in dequeue_many self._queue_ref, n=n, component_types=self._dtypes, name=name) File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/gen_data_flow_ops.py", line 465, in _queue_dequeue_many timeout_ms=timeout_ms, name=name) File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/op_def_library.py", line 704, in apply_op op_def=op_def) File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/ops.py", line 2260, in create_op original_op=self._default_original_op, op_def=op_def) File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/ops.py", line 1230, in __init__ self._traceback = _extract_stack()

I assume there is some sort of incorrect character in the midi data, but the note sequence parser did not have any issue with these midis so there may be something else going on. I have gotten similar errors with other sets of MIDI files.

magenta:convert_sequences_to_melodies broken

I think
bazel build magenta:convert_sequences_to_melodies is broken
see error below. I think this was working jun13?

ERROR: no such target '//magenta:convert_sequences_to_melodies': target 'convert_sequences_to_melodies' not declared in package 'magenta' defined by /home/ben/mymagenta/magenta/magenta/BUILD.

strangely
bazel build magenta:sequence_to_melodies

builds
INFO: Found 1 target...
Target //magenta:sequence_to_melodies up-to-date (nothing to build)
INFO: Elapsed time: 0.081s, Critical Path: 0.00s

but an not be run
bazel run magenta:sequence_to_melodies
INFO: Found 1 target...
Target //magenta:sequence_to_melodies up-to-date (nothing to build)
INFO: Elapsed time: 0.081s, Critical Path: 0.00s

but can not be run

ERROR: Cannot run target //magenta:sequence_to_melodies: Not executable.
INFO: Elapsed time: 0.073s
ERROR: Build failed. Not running target.

Unless I have screwed things up, I am sure these were working recently.

Error with attention_rnn_generate (unreferenced attribute)

It seems there is an error in the MelodyEncoderDecoder.class_index_to_melody_event() method: the variable self.num_model_events is used (on attention_rnn_encoder_decoder.py, line 222) without being declared elsewhere. It may be a legacy variable.

Command run:

bazel run //magenta/models/attention_rnn:attention_rnn_generate -- \
--run_dir=/tmp/attention_rnn/logdir/run1 \
--hparams="{'batch_size':64,'rnn_layer_sizes':[64,64]}" \
--output_dir=/tmp/attention_rnn/generated \
--num_outputs=10 \
--num_steps=128 \
--primer_melody="[60]"

Traceback:

Traceback (most recent call last):
  File "/home/pot/.cache/bazel/_bazel_pot/5fc7cd7a555a3767114962921a1b913d/execroot/magenta/bazel-out/local-opt/bin/magenta/models/attention_rnn/attention_rnn_generate.runfiles/__main__/magenta/models/attention_rnn/attention_rnn_generate.py", line 45, in <module>
    tf.app.run()
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/platform/app.py", line 30, in run
    sys.exit(main(sys.argv))
  File "/home/pot/.cache/bazel/_bazel_pot/5fc7cd7a555a3767114962921a1b913d/execroot/magenta/bazel-out/local-opt/bin/magenta/models/attention_rnn/attention_rnn_generate.runfiles/__main__/magenta/models/attention_rnn/attention_rnn_generate.py", line 41, in main
    melody_rnn_generate.run_with_flags(generator)
  File "/home/pot/.cache/bazel/_bazel_pot/5fc7cd7a555a3767114962921a1b913d/execroot/magenta/bazel-out/local-opt/bin/magenta/models/attention_rnn/attention_rnn_generate.runfiles/__main__/magenta/models/shared/melody_rnn_generate.py", line 192, in run_with_flags
    generate_request)
  File "/home/pot/.cache/bazel/_bazel_pot/5fc7cd7a555a3767114962921a1b913d/execroot/magenta/bazel-out/local-opt/bin/magenta/models/attention_rnn/attention_rnn_generate.runfiles/__main__/magenta/lib/sequence_generator.py", line 136, in generate
    return self._generate(generate_sequence_request)
  File "/home/pot/.cache/bazel/_bazel_pot/5fc7cd7a555a3767114962921a1b913d/execroot/magenta/bazel-out/local-opt/bin/magenta/models/attention_rnn/attention_rnn_generate.runfiles/__main__/magenta/models/shared/melody_rnn_sequence_generator.py", line 165, in _generate
    self._melody_encoder_decoder.extend_melodies([melody], softmax_)
  File "/home/pot/.cache/bazel/_bazel_pot/5fc7cd7a555a3767114962921a1b913d/execroot/magenta/bazel-out/local-opt/bin/magenta/models/attention_rnn/attention_rnn_generate.runfiles/__main__/magenta/lib/melodies_lib.py", line 954, in extend_melodies
    melody_event = self.class_index_to_melody_event(chosen_class, melodies[i])
  File "/home/pot/__A__/Development/AI/magenta/magenta/models/attention_rnn/attention_rnn_encoder_decoder.py", line 222, in class_index_to_melody_event
    if class_index == self.num_model_events + i:
AttributeError: 'MelodyEncoderDecoder' object has no attribute 'num_model_events'

The only other place the variable is referenced is on lookback_rnn_encoder_decoder.py

Edit: The error seems to came from this commit: eb4e71a#diff-05b7ae22d66de3b23021d1007bc70af1R222

Attention RNN fails to compile on Tensorflow r0.10

While i try to execute the following code:
./bazel-bin/magenta/models/attention_rnn/attention_rnn_train --run_dir=/home/prakhar/Documents/Music/Magenta/outdir --sequence_example_file=/home/prakhar/Documents/Music/Magenta/dataset_dir/training_melodies.tfrecord --hparams="{'batch_size':64,'rnn_layer_sizes':[128,128]}" --num_training_steps=2000

I get this error thrown at me using tensorflow 0.10:
Traceback (most recent call last): File "/home/prakhar/Documents/Music/Magenta/magenta/bazel-bin/magenta/models/attention_rnn/attention_rnn_train.runfiles/__main__/magenta/models/attention_rnn/attention_rnn_train.py", line 37, in <module> import attention_rnn_graph File "/home/prakhar/Documents/Music/Magenta/magenta/magenta/models/attention_rnn/attention_rnn_graph.py", line 171, in <module> _is_sequence = tf.nn.rnn_cell._is_sequence AttributeError: 'module' object has no attribute '_is_sequence'

Same thing also happens with the master branch of tensorflow. But the issue vanishes with tensorflow r0.9. Unfortunately i have significant reasons to stick to r0.10 and if someone could point me in the direction as to what might be wrong?

Enhancement Request: Conversion from old training runs to new training runs when possible

When a major change is made to melody_rnn_train.py which makes previous saved training data broken, a conversion program is made to convert (if possible) old data to the new format.

Example: I have several saved training runs from about a month ago which are now broken. I thought it was just the changed directory in the checkpoint file but there must be more to it. An example zipped file is at

https://github.com/hpssjellis/magenta-music-layer-research/blob/master/beauty-and-beats-all-keys/midi12-layer25-train200.zip

or

https://github.com/hpssjellis/magenta-music-layer-research/blob/master/re-train-tests/many-layer50-train8000.zip

Not a big deal while Magenta is so young (My files were very quick to make) but something to keep in mind for future changes to training and evaluation data. Could be very frustrating with saved and broken 50000 loop training runs.

I would like to write a review of Boulanger-Lewandowski 2012 (http://www-etud.iro.umontreal.ca/~boulanni/ICML2012.pdf)

I would like to write a review of Boulanger-Lewandowski 2012. This paper describes a few powerful sequential generative models, such as the RNN-RBM.

The architecture is simple but brilliant: at each timestep, the RNN specifies the parameters of an RBM, which then generates musical notes via Gibbs sampling. The architecture in Graves 2013 is similar to the RNN-RBM and Graves 2013 references Boulanger-Lewandowski 2012

I also have reimplemented the RNN-RBM model in TensorFlow, and would be happy to share and document my code in the review. There does already exist a Theano implementation of this model here.

As per the instructions on the reviews page, I am filing an issue with this request. I'm looking forward to hearing back.

cannot run shell script, error:"__init__() got an unexpected keyword argument 'state_is_tuple'"

Tested on two different Ubuntu 16.04 machines, same error. I run through the directions exactly and get this error:

jeff@elephantbird:~/magenta/magenta/models/basic_rnn$ ./run_basic_rnn_train.sh $EXPERIMENT_DIR $HYPERPARAMETER_STRING $NUM_TRAINING_STEPS $TRAIN_DATA [$EVAL_DATA] INFO: Found 1 target... Target //magenta/models/basic_rnn:basic_rnn_train up-to-date: bazel-bin/magenta/models/basic_rnn/basic_rnn_train INFO: Elapsed time: 0.326s, Critical Path: 0.00s INFO:tensorflow:hparams = {'rnn_layer_sizes': [50], 'decay_rate': 0.85, 'dropout_keep_prob': 0.5, 'batch_size': 128, 'decay_steps': 1000, 'clip_norm': 5, 'initial_learning_rate': 0.01, 'skip_first_n_losses': 0} INFO:tensorflow:hparams = {'rnn_layer_sizes': [50], 'decay_rate': 0.85, 'dropout_keep_prob': 0.5, 'batch_size': 128, 'decay_steps': 1000, 'clip_norm': 5, 'initial_learning_rate': 0.01, 'skip_first_n_losses': 0} Traceback (most recent call last): File "/home/jeff/magenta/bazel-bin/magenta/models/basic_rnn/basic_rnn_train.runfiles/__main__/magenta/models/basic_rnn/basic_rnn_train.py", line 49, in <module> tf.app.run() File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/platform/app.py", line 30, in run sys.exit(main(sys.argv)) File "/home/jeff/magenta/bazel-bin/magenta/models/basic_rnn/basic_rnn_train.runfiles/__main__/magenta/models/basic_rnn/basic_rnn_train.py", line 45, in main Starting TensorBoard 16 on port 6006 (You can navigate to http://0.0.0.0:6006) Traceback (most recent call last): File "/home/jeff/magenta/bazel-bin/magenta/models/basic_rnn/basic_rnn_train.runfiles/__main__/magenta/models/basic_rnn/basic_rnn_train.py", line 49, in <module> tf.app.run() File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/platform/app.py", line 30, in run sys.exit(main(sys.argv)) File "/home/jeff/magenta/bazel-bin/magenta/models/basic_rnn/basic_rnn_train.runfiles/__main__/magenta/models/basic_rnn/basic_rnn_train.py", line 45, in main melody_rnn_train.run(melody_encoder_decoder, basic_rnn_graph.build_graph) File "/home/jeff/magenta/bazel-bin/magenta/models/basic_rnn/basic_rnn_train.runfiles/__main__/magenta/models/shared/melody_rnn_train.py", line 206, in run melody_rnn_train.run(melody_encoder_decoder, basic_rnn_graph.build_graph) File "/home/jeff/magenta/bazel-bin/magenta/models/basic_rnn/basic_rnn_train.runfiles/__main__/magenta/models/shared/melody_rnn_train.py", line 206, in run FLAGS.sequence_example_file) File "/home/jeff/magenta/magenta/models/basic_rnn/basic_rnn_graph.py", line 88, in build_graph FLAGS.sequence_example_file) File "/home/jeff/magenta/magenta/models/basic_rnn/basic_rnn_graph.py", line 88, in build_graph num_units, state_is_tuple=state_is_tuple) TypeError: __init__() got an unexpected keyword argument 'state_is_tuple' num_units, state_is_tuple=state_is_tuple) TypeError: __init__() got an unexpected keyword argument 'state_is_tuple'

Any clues? Thanks.

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.