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:
- https://github.com/tensorflow/community/blob/master/rfcs/20180907-contrib-sunset.md
- https://github.com/tensorflow/addons If you depend on functionality not listed there, please file an issue.
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:
- Created 4 years ago
- Comments:8 (3 by maintainers)
Top GitHub Comments
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.is that path correct? your slashes may be backwards