Closed hasamkhalid closed 4 years ago
My audio samples had large duration in seconds thats why i was getting this exception. closing it now.
Can you please tell me how you solve this issue?
@LauraLQ if you are using your own wav files dataset, review your dataset to see if some of the wavs are not corrupted (duration 0 or empty files). Another fix could be, if your wav files have very large durations. Best duration would be below 14secs. I did these two things to fix this error. Thx.
@hasamkhalid Thank you for your quick response. Indeed, my own wavs have durations bigger than 12s. Thank you and best regards!
I am trying to use my own created dataset. I made it just like the LJspeech data set. The training works fine on the LJspeech dataset but on my own dataset, I get the below exception. Well, I changed the max_iter to 400, but then I get the same exception after a few more steps. Can anyone help? Thankyou!
Step 13 [3.701 sec/step, loss=0.87153, avg_loss=0.87044] Exiting due to exception: Incompatible shapes: [32,1490,80] vs. [32,1000,80] [[node model/loss/sub (defined at /mnt/a/tacotron/models/tacotron.py:118) ]] [[node model/optimizer/Adam/update (defined at /mnt/a/tacotron/models/tacotron.py:147) ]]
Caused by op 'model/loss/sub', defined at: File "train.py", line 152, in
main()
File "train.py", line 148, in main
train(log_dir, args)
File "train.py", line 64, in train
model.add_loss()
File "/mnt/a/tacotron/models/tacotron.py", line 118, in add_loss
self.mel_loss = tf.reduce_mean(tf.abs(self.mel_targets - self.mel_outputs))
File "/root/anaconda3/envs/tacotron/lib/python3.7/site-packages/tensorflow/python/ops/math_ops.py", line 812, in binary_op_wrapper
return func(x, y, name=name)
File "/root/anaconda3/envs/tacotron/lib/python3.7/site-packages/tensorflow/python/ops/gen_math_ops.py", line 9536, in sub
"Sub", x=x, y=y, name=name)
File "/root/anaconda3/envs/tacotron/lib/python3.7/site-packages/tensorflow/python/framework/op_def_library.py", line 788, in _apply_op_helper
op_def=op_def)
File "/root/anaconda3/envs/tacotron/lib/python3.7/site-packages/tensorflow/python/util/deprecation.py", line 507, in new_func
return func(*args, **kwargs)
File "/root/anaconda3/envs/tacotron/lib/python3.7/site-packages/tensorflow/python/framework/ops.py", line 3300, in create_op
op_def=op_def)
File "/root/anaconda3/envs/tacotron/lib/python3.7/site-packages/tensorflow/python/framework/ops.py", line 1801, in init
self._traceback = tf_stack.extract_stack()
InvalidArgumentError (see above for traceback): Incompatible shapes: [32,1490,80] vs. [32,1000,80] [[node model/loss/sub (defined at /mnt/a/tacotron/models/tacotron.py:118) ]] [[node model/optimizer/Adam/update (defined at /mnt/a/tacotron/models/tacotron.py:147) ]]
Traceback (most recent call last): File "/root/anaconda3/envs/tacotron/lib/python3.7/site-packages/tensorflow/python/client/session.py", line 1334, in _do_call return fn(*args) File "/root/anaconda3/envs/tacotron/lib/python3.7/site-packages/tensorflow/python/client/session.py", line 1319, in _run_fn options, feed_dict, fetch_list, target_list, run_metadata) File "/root/anaconda3/envs/tacotron/lib/python3.7/site-packages/tensorflow/python/client/session.py", line 1407, in _call_tf_sessionrun run_metadata) tensorflow.python.framework.errors_impl.InvalidArgumentError: Incompatible shapes: [32,1490,80] vs. [32,1000,80] [[{{node model/loss/sub}}]] [[{{node model/optimizer/Adam/update}}]]
During handling of the above exception, another exception occurred: