TensorSpeech / TensorFlowTTS

:stuck_out_tongue_closed_eyes: TensorFlowTTS: Real-Time State-of-the-art Speech Synthesis for Tensorflow 2 (supported including English, French, Korean, Chinese, German and Easy to adapt for other languages)
https://tensorspeech.github.io/TensorFlowTTS/
Apache License 2.0
3.82k stars 812 forks source link

Error while training MelGAN #126

Closed adfost closed 4 years ago

adfost commented 4 years ago

I am currently trying to train MelGAN on a new dataset (in the same format as LJSpeech). I am getting the following error:

Traceback (most recent call last): File "/home/ubuntu/anaconda3/lib/python3.7/site-packages/tensorflow/python/ops/gen_nn_ops.py", line 926, in conv2d "dilations", dilations) tensorflow.python.eager.core._FallbackException: Expecting int64_t value for attr strides, got numpy.int32

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "examples/melgan/train_melgan.py", line 628, in main() File "examples/melgan/train_melgan.py", line 586, in main discriminator(y_hat) File "/home/ubuntu/anaconda3/lib/python3.7/site-packages/tensorflow/python/keras/engine/base_layer.py", line 968, in call outputs = self.call(cast_inputs, *args, kwargs) File "./tensorflow_tts/models/melgan.py", line 483, in call outs += [f(x)] File "/home/ubuntu/anaconda3/lib/python3.7/site-packages/tensorflow/python/keras/engine/base_layer.py", line 968, in call outputs = self.call(cast_inputs, *args, *kwargs) File "./tensorflow_tts/models/melgan.py", line 426, in call x = f(x) File "/home/ubuntu/anaconda3/lib/python3.7/site-packages/tensorflow/python/keras/engine/base_layer.py", line 968, in call outputs = self.call(cast_inputs, args, kwargs) File "./tensorflow_tts/utils/group_conv.py", line 317, in call outputs = self._convolution_op(inputs, self.kernel) File "./tensorflow_tts/utils/group_conv.py", line 116, in call return self.conv_op(inp, filter) File "/home/ubuntu/anaconda3/lib/python3.7/site-packages/tensorflow/python/ops/nn_ops.py", line 638, in call return self.call(inp, filter) File "/home/ubuntu/anaconda3/lib/python3.7/site-packages/tensorflow/python/ops/nn_ops.py", line 237, in call name=self.name) File "/home/ubuntu/anaconda3/lib/python3.7/site-packages/tensorflow/python/ops/nn_ops.py", line 226, in _conv1d name=name) File "/home/ubuntu/anaconda3/lib/python3.7/site-packages/tensorflow/python/util/deprecation.py", line 574, in new_func return func(*args, *kwargs) File "/home/ubuntu/anaconda3/lib/python3.7/site-packages/tensorflow/python/util/deprecation.py", line 574, in new_func return func(args, **kwargs) File "/home/ubuntu/anaconda3/lib/python3.7/site-packages/tensorflow/python/ops/nn_ops.py", line 1663, in conv1d name=name) File "/home/ubuntu/anaconda3/lib/python3.7/site-packages/tensorflow/python/ops/gen_nn_ops.py", line 933, in conv2d data_format=data_format, dilations=dilations, name=name, ctx=_ctx) File "/home/ubuntu/anaconda3/lib/python3.7/site-packages/tensorflow/python/ops/gen_nn_ops.py", line 1022, in conv2d_eager_fallback ctx=ctx, name=name) File "/home/ubuntu/anaconda3/lib/python3.7/site-packages/tensorflow/python/eager/execute.py", line 60, in quick_execute inputs, attrs, num_outputs) tensorflow.python.framework.errors_impl.InvalidArgumentError: input and filter must have the same depth: 16 vs 4 [Op:Conv2D]

I was told that this may be because I wasn't using the newest version, but I redownloaded what I believed to be the newest version and ran it and still got the same error. Any insights? Thank you.

dathudeptrai commented 4 years ago

@adfost seems you not yet update our newest code. because the newest code, the train_melgan.py just have 503 lines while in ur bug, the line cause bug > 503 :)).

adfost commented 4 years ago

I fixed it. Thanks

dathudeptrai commented 4 years ago

@adfost glad to see ur problem was fixed :D. If you see the repo helpful, let star it and share our work with ur friends :)). BTW, i suggest you train mb-melgan rathert than melgan since mb-melgan is clearly better.