question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error when trying to generate samples with my own weights (MusicVAE)

See original GitHub issue

(base) ales-MacBook-Pro:Desktop ale$ sudo music_vae_generate --config=cat-mel_2bar_big --checkpoint_file=\midis\train\model.ckpt-60.data-00000-of-00001 --mode=sample --num_outputs=5 --output_dir=/midis

WARNING: The TensorFlow contrib module will not be included in TensorFlow 2.0. For more information, please see:

INFO:tensorflow:Loading model… I0528 17:36:45.572510 4609672640 music_vae_generate.py:148] Loading model… INFO:tensorflow:Building MusicVAE model with BidirectionalLstmEncoder, CategoricalLstmDecoder, and hparams: {‘max_seq_len’: 32, ‘z_size’: 512, ‘free_bits’: 0, ‘max_beta’: 0.5, ‘beta_rate’: 0.99999, ‘batch_size’: 5, ‘grad_clip’: 1.0, ‘clip_mode’: ‘global_norm’, ‘grad_norm_clip_to_zero’: 10000, ‘learning_rate’: 0.001, ‘decay_rate’: 0.9999, ‘min_learning_rate’: 1e-05, ‘conditional’: True, ‘dec_rnn_size’: [2048, 2048, 2048], ‘enc_rnn_size’: [2048], ‘dropout_keep_prob’: 1.0, ‘sampling_schedule’: ‘inverse_sigmoid’, ‘sampling_rate’: 1000, ‘use_cudnn’: False, ‘residual_encoder’: False, ‘residual_decoder’: False} I0528 17:36:45.574896 4609672640 base_model.py:158] Building MusicVAE model with BidirectionalLstmEncoder, CategoricalLstmDecoder, and hparams: {‘max_seq_len’: 32, ‘z_size’: 512, ‘free_bits’: 0, ‘max_beta’: 0.5, ‘beta_rate’: 0.99999, ‘batch_size’: 5, ‘grad_clip’: 1.0, ‘clip_mode’: ‘global_norm’, ‘grad_norm_clip_to_zero’: 10000, ‘learning_rate’: 0.001, ‘decay_rate’: 0.9999, ‘min_learning_rate’: 1e-05, ‘conditional’: True, ‘dec_rnn_size’: [2048, 2048, 2048], ‘enc_rnn_size’: [2048], ‘dropout_keep_prob’: 1.0, ‘sampling_schedule’: ‘inverse_sigmoid’, ‘sampling_rate’: 1000, ‘use_cudnn’: False, ‘residual_encoder’: False, ‘residual_decoder’: False} WARNING:tensorflow:From /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/tensorflow/python/framework/op_def_library.py:263: colocate_with (from tensorflow.python.framework.ops) is deprecated and will be removed in a future version. Instructions for updating: Colocations handled automatically by placer. W0528 17:36:45.588173 4609672640 deprecation.py:323] From /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/tensorflow/python/framework/op_def_library.py:263: colocate_with (from tensorflow.python.framework.ops) is deprecated and will be removed in a future version. Instructions for updating: Colocations handled automatically by placer. INFO:tensorflow: Encoder Cells (bidirectional): units: [2048]

I0528 17:36:45.592164 4609672640 lstm_models.py:102] Encoder Cells (bidirectional): units: [2048]

WARNING:tensorflow:From /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/magenta/models/music_vae/lstm_utils.py:44: MultiRNNCell.init (from tensorflow.python.ops.rnn_cell_impl) is deprecated and will be removed in a future version. Instructions for updating: This class is equivalent as tf.keras.layers.StackedRNNCells, and will be replaced by that in Tensorflow 2.0. W0528 17:36:45.598289 4609672640 deprecation.py:323] From /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/magenta/models/music_vae/lstm_utils.py:44: MultiRNNCell.init (from tensorflow.python.ops.rnn_cell_impl) is deprecated and will be removed in a future version. Instructions for updating: This class is equivalent as tf.keras.layers.StackedRNNCells, and will be replaced by that in Tensorflow 2.0. INFO:tensorflow: Decoder Cells: units: [2048, 2048, 2048]

I0528 17:36:45.610680 4609672640 lstm_models.py:293] Decoder Cells: units: [2048, 2048, 2048]

WARNING:tensorflow:Setting non-training sampling schedule from inverse_sigmoid:1000.000000 to constant:1.0. W0528 17:36:45.613170 4609672640 lstm_utils.py:201] Setting non-training sampling schedule from inverse_sigmoid:1000.000000 to constant:1.0. WARNING:tensorflow:From /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/magenta/models/music_vae/lstm_utils.py:207: to_float (from tensorflow.python.ops.math_ops) is deprecated and will be removed in a future version. Instructions for updating: Use tf.cast instead. W0528 17:36:45.613519 4609672640 deprecation.py:323] From /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/magenta/models/music_vae/lstm_utils.py:207: to_float (from tensorflow.python.ops.math_ops) is deprecated and will be removed in a future version. Instructions for updating: Use tf.cast instead. WARNING:tensorflow:From /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/magenta/models/music_vae/lstm_utils.py:161: dense (from tensorflow.python.layers.core) is deprecated and will be removed in a future version. Instructions for updating: Use keras.layers.dense instead. W0528 17:36:45.741767 4609672640 deprecation.py:323] From /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/magenta/models/music_vae/lstm_utils.py:161: dense (from tensorflow.python.layers.core) is deprecated and will be removed in a future version. Instructions for updating: Use keras.layers.dense instead. WARNING:tensorflow:From /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/tensorflow_probability/python/distributions/onehot_categorical.py:172: multinomial (from tensorflow.python.ops.random_ops) is deprecated and will be removed in a future version. Instructions for updating: Use tf.random.categorical instead. W0528 17:36:46.192772 4609672640 deprecation.py:323] From /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/tensorflow_probability/python/distributions/onehot_categorical.py:172: multinomial (from tensorflow.python.ops.random_ops) is deprecated and will be removed in a future version. Instructions for updating: Use tf.random.categorical instead. WARNING:tensorflow:From /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/tensorflow/contrib/rnn/python/ops/rnn.py:233: bidirectional_dynamic_rnn (from tensorflow.python.ops.rnn) is deprecated and will be removed in a future version. Instructions for updating: Please use keras.layers.Bidirectional(keras.layers.RNN(cell)), which is equivalent to this API W0528 17:36:46.378690 4609672640 deprecation.py:323] From /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/tensorflow/contrib/rnn/python/ops/rnn.py:233: bidirectional_dynamic_rnn (from tensorflow.python.ops.rnn) is deprecated and will be removed in a future version. Instructions for updating: Please use keras.layers.Bidirectional(keras.layers.RNN(cell)), which is equivalent to this API WARNING:tensorflow:From /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/tensorflow/python/ops/rnn.py:443: dynamic_rnn (from tensorflow.python.ops.rnn) is deprecated and will be removed in a future version. Instructions for updating: Please use keras.layers.RNN(cell), which is equivalent to this API W0528 17:36:46.379512 4609672640 deprecation.py:323] From /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/tensorflow/python/ops/rnn.py:443: dynamic_rnn (from tensorflow.python.ops.rnn) is deprecated and will be removed in a future version. Instructions for updating: Please use keras.layers.RNN(cell), which is equivalent to this API WARNING:tensorflow:From /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/tensorflow/python/ops/rnn.py:626: to_int32 (from tensorflow.python.ops.math_ops) is deprecated and will be removed in a future version. Instructions for updating: Use tf.cast instead. W0528 17:36:46.390941 4609672640 deprecation.py:323] From /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/tensorflow/python/ops/rnn.py:626: to_int32 (from tensorflow.python.ops.math_ops) is deprecated and will be removed in a future version. Instructions for updating: Use tf.cast instead. 2019-05-28 17:36:47.313100: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA WARNING:tensorflow:From /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/tensorflow/python/training/saver.py:1266: checkpoint_exists (from tensorflow.python.training.checkpoint_management) is deprecated and will be removed in a future version. Instructions for updating: Use standard file APIs to check for files with this prefix. W0528 17:36:47.395946 4609672640 deprecation.py:323] From /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/tensorflow/python/training/saver.py:1266: checkpoint_exists (from tensorflow.python.training.checkpoint_management) is deprecated and will be removed in a future version. Instructions for updating: Use standard file APIs to check for files with this prefix. Traceback (most recent call last): File “/Library/Frameworks/Python.framework/Versions/3.7/bin/music_vae_generate”, line 11, in <module> sys.exit(console_entry_point()) File “/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/magenta/models/music_vae/music_vae_generate.py”, line 191, in console_entry_point tf.app.run(main) File “/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/tensorflow/python/platform/app.py”, line 125, in run _sys.exit(main(argv)) File “/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/magenta/models/music_vae/music_vae_generate.py”, line 187, in main run(configs.CONFIG_MAP) File “/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/magenta/models/music_vae/music_vae_generate.py”, line 156, in run checkpoint_dir_or_path=checkpoint_dir_or_path) File “/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/magenta/models/music_vae/trained_model.py”, line 137, in init saver.restore(self._sess, checkpoint_path) File “/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/tensorflow/python/training/saver.py”, line 1268, in restore + compat.as_text(save_path)) ValueError: The passed save_path is not a valid checkpoint: midistrainmodel.ckpt-60.data-00000-of-00001 (base) ales-MacBook-Pro:Desktop ale$

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
adarobcommented, May 28, 2019

assuming ls /midis/train/model.ckpt-64* returns the 3 checkpoint files, you should be doing --checkpoint_file=/midis/train/model.ckpt-64. You should alternatively be able to just set --run_dir to the same value you used during training.

1reaction
adarobcommented, May 28, 2019

is that path correct? your slashes may be backwards

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error when trying to generate samples with my own ... - GitHub
Error when trying to generate samples with my own weights (MusicVAE) #1540 ... INFO:tensorflow:Building MusicVAE model with ...
Read more >
@magenta/music - v1.23.1 - GitHub Pages
If you want to get hands-on with Magenta, we've put together a small interactive tutorial that takes you through generating a small melody...
Read more >
A Hierarchical Latent Vector Model for Learning Long ... - arXiv
The Variational Autoencoder (VAE) has proven to be an effective model for producing semantically meaningful latent representations for natural data.
Read more >
Generating and Interpolating Music Snippets with MusicVAE
An introduction to using variational auto-encoders to model the distribution of short music snippets. Made by Hao Hao Tan using Weights ...
Read more >
Newest 'magenta' Questions - Stack Overflow
I receive various error when trying to install magenta with pip i get an ... I was trying to train my own model...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found