devinrhode2 / magenta

Magenta: Music and Art Generation with Machine Intelligence
Apache License 2.0
0 stars 0 forks source link

Fuckin Stuck #1

Open devinrhode2 opened 8 years ago

devinrhode2 commented 8 years ago

Trying to generate some melodies with Magenta's basic_rnn model, but am stuck getting this error:

magenta ➤ bazel run //magenta/models:basic_rnn_generate -- --experiment_run_dir=~/mid-sets/exp1/20062016-3 --hparams='{"rnn_layer_sizes":[50]}' --primer_midi=$PRIMER_PATH --output_dir=/Users/devinrhode2/midi-sets/basic_rnn_generated --num_steps=64 --num_outputs=16
WARNING: /private/var/tmp/_bazel_devinrhode2/c975dcb72341a81e7d3d947b6fdad20d/external/protobuf/WORKSPACE:1: Workspace name in /private/var/tmp/_bazel_devinrhode2/c975dcb72341a81e7d3d947b6fdad20d/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_generate up-to-date:
  bazel-bin/magenta/models/basic_rnn_generate
INFO: Elapsed time: 0.706s, Critical Path: 0.01s

INFO: Running command line: bazel-bin/magenta/models/basic_rnn_generate '--experiment_run_dir=~/mid-sets/exp1/20062016-3' '--hparams={"rnn_layer_sizes":[50]}' '--primer_midi=/Users/devinrhode2/midi-sets/curated-cool-midi-rap-hip-hop/StillDre.mid' '--output_dir=/Users/devinrhode2/midi-sets/basic_rnn_generated' '--num_steps=64' '--num_outputs=16'
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}
WARNING:tensorflow:<tensorflow.python.ops.rnn_cell.LSTMCell object at 0x1160782d0>: Using a concatenated state is slower and will soon be deprecated.  Use state_is_tuple=True.
<tensorflow.python.ops.rnn_cell.LSTMCell object at 0x1160782d0>: Using a concatenated state is slower and will soon be deprecated.  Use state_is_tuple=True.
Checkpoint dir: ~/mid-sets/exp1/20062016-3/train
Traceback (most recent call last):
  File "/private/var/tmp/_bazel_devinrhode2/c975dcb72341a81e7d3d947b6fdad20d/magenta/bazel-out/local-opt/bin/magenta/models/basic_rnn_generate.runfiles/__main__/magenta/models/basic_rnn/basic_rnn_generate.py", line 273, in <module>
    tf.app.run()
  File "/usr/local/lib/python2.7/site-packages/tensorflow/python/platform/app.py", line 30, in run
    sys.exit(main(sys.argv))
  File "/private/var/tmp/_bazel_devinrhode2/c975dcb72341a81e7d3d947b6fdad20d/magenta/bazel-out/local-opt/bin/magenta/models/basic_rnn_generate.runfiles/__main__/magenta/models/basic_rnn/basic_rnn_generate.py", line 261, in main
    FLAGS.num_steps))
  File "/private/var/tmp/_bazel_devinrhode2/c975dcb72341a81e7d3d947b6fdad20d/magenta/bazel-out/local-opt/bin/magenta/models/basic_rnn_generate.runfiles/__main__/magenta/models/basic_rnn/basic_rnn_generate.py", line 182, in sampler_loop
    saver.restore(session, checkpoint_file)
  File "/usr/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 "/usr/local/lib/python2.7/site-packages/tensorflow/python/pywrap_tensorflow.py", line 457, in get_matching_files
    return GetMatchingFiles(compat.as_bytes(filename), status)
  File "/usr/local/lib/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.
magenta ➤  
devinrhode2 commented 8 years ago

Need to create a script that runs through a list of midi urls, prompts for various inputs, and generally tries to automate the steps explained in magenta's readme and in the basic_rnn readme.