synthesize.py shape error
sharvi2497 opened this issue · 0 comments
When I pass CHECKPOINT_TEXT2MEL = "models/LJ01-1/model_gs_724k"
CHECKPOINT_SSRN = "models/LJ01-2/model_gs_718k", i get the following error. How to resolve this, any suggestions?
Traceback (most recent call last):
File "synthesize_example.py", line 21, in
synthesizer = Synthesizer(CHECKPOINT_TEXT2MEL, CHECKPOINT_SSRN)
File "/home/stomar/dc_tts/synthesize.py", line 45, in init
saver1.restore(self._sess, self._checkpoint_text2mel)
File "/home/stomar/anaconda3/envs/dc_tts_synthesis2/lib/python2.7/site-packages/tensorflow/python/training/saver.py", line 1312, in restore
err, "a mismatch between the current graph and the graph")
tensorflow.python.framework.errors_impl.InvalidArgumentError: Restoring from checkpoint failed. This is most likely due to a mismatch between the current graph and the graph from the checkpoint. Please ensure that you have not altered the graph expected based on the checkpoint. Original error:
Assign requires shapes of both tensors to match. lhs shape= [34,128] rhs shape= [32,128]
[[node save/Assign_208 (defined at /home/stomar/dc_tts/synthesize.py:44) ]]
Caused by op u'save/Assign_208', defined at:
File "synthesize_example.py", line 21, in
synthesizer = Synthesizer(CHECKPOINT_TEXT2MEL, CHECKPOINT_SSRN)
File "/home/stomar/dc_tts/synthesize.py", line 44, in init
saver1 = tf.train.Saver(var_list=var_list)
File "/home/stomar/anaconda3/envs/dc_tts_synthesis2/lib/python2.7/site-packages/tensorflow/python/training/saver.py", line 832, in init
self.build()
File "/home/stomar/anaconda3/envs/dc_tts_synthesis2/lib/python2.7/site-packages/tensorflow/python/training/saver.py", line 844, in build
self._build(self._filename, build_save=True, build_restore=True)
File "/home/stomar/anaconda3/envs/dc_tts_synthesis2/lib/python2.7/site-packages/tensorflow/python/training/saver.py", line 881, in _build
build_save=build_save, build_restore=build_restore)
File "/home/stomar/anaconda3/envs/dc_tts_synthesis2/lib/python2.7/site-packages/tensorflow/python/training/saver.py", line 513, in _build_internal
restore_sequentially, reshape)
File "/home/stomar/anaconda3/envs/dc_tts_synthesis2/lib/python2.7/site-packages/tensorflow/python/training/saver.py", line 354, in _AddRestoreOps
assign_ops.append(saveable.restore(saveable_tensors, shapes))
File "/home/stomar/anaconda3/envs/dc_tts_synthesis2/lib/python2.7/site-packages/tensorflow/python/training/saving/saveable_object_util.py", line 73, in restore
self.op.get_shape().is_fully_defined())
File "/home/stomar/anaconda3/envs/dc_tts_synthesis2/lib/python2.7/site-packages/tensorflow/python/ops/state_ops.py", line 223, in assign
validate_shape=validate_shape)
File "/home/stomar/anaconda3/envs/dc_tts_synthesis2/lib/python2.7/site-packages/tensorflow/python/ops/gen_state_ops.py", line 64, in assign
use_locking=use_locking, name=name)
File "/home/stomar/anaconda3/envs/dc_tts_synthesis2/lib/python2.7/site-packages/tensorflow/python/framework/op_def_library.py", line 788, in _apply_op_helper
op_def=op_def)
File "/home/stomar/anaconda3/envs/dc_tts_synthesis2/lib/python2.7/site-packages/tensorflow/python/util/deprecation.py", line 507, in new_func
return func(*args, **kwargs)
File "/home/stomar/anaconda3/envs/dc_tts_synthesis2/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 3300, in create_op
op_def=op_def)
File "/home/stomar/anaconda3/envs/dc_tts_synthesis2/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 1801, in init
self._traceback = tf_stack.extract_stack()
InvalidArgumentError (see above for traceback): Restoring from checkpoint failed. This is most likely due to a mismatch between the current graph and the graph from the checkpoint. Please ensure that you have not altered the graph expected based on the checkpoint. Original error:
Assign requires shapes of both tensors to match. lhs shape= [34,128] rhs shape= [32,128]
[[node save/Assign_208 (defined at /home/stomar/dc_tts/synthesize.py:44) ]]