yanggeng1995 / vae_tacotron

MIT License
51 stars 19 forks source link

ValueError in eval #2

Closed ZohaibAhmed closed 5 years ago

ZohaibAhmed commented 5 years ago

First off, this is great work!

When I attempt to run eval:

python eval.py --checkpoint ./logs-tacotron/model.ckpt-50000 --reference_audio='./logs-tacotron/step-48000-audio.wav'

I get the following error:

ValueError: Input 0 of layer conv2d_1 is incompatible with the layer: expected ndim=4, found ndim=3. Full shape received: [None, 80, 1]

Here's a little more of the stack trace:

Constructing model: tacotron
Traceback (most recent call last):
  File "eval.py", line 56, in <module>
    main()
  File "eval.py", line 52, in main
    run_eval(args)
  File "eval.py", line 32, in run_eval
    synth.load(args.checkpoint)
  File "/vae_tacotron/synthesizer.py", line 19, in load
    self.model.initialize(inputs, input_lengths, mel_targets)
  File "/vae_tacotron/models/tacotron.py", line 58, in initialize
    scope='vae')
  File "/vae_tacotron/models/modules.py", line 13, in VAE
    is_training=is_training)
  File "/vae_tacotron/models/modules.py", line 27, in ReferenceEncoder
    strides, tf.nn.relu, is_training, 'conv2d_{}'.format(i))
  File "/vae_tacotron/models/modules.py", line 150, in conv2d
    inputs, filters=filters, kernel_size=kernel_size, strides=strides, padding='same')
  File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/layers/convolutional.py", line 417, in conv2d
    return layer.apply(inputs)
  File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/keras/engine/base_layer.py", line 828, in apply
    return self.__call__(inputs, *args, **kwargs)
  File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/layers/base.py", line 364, in __call__
    outputs = super(Layer, self).__call__(inputs, *args, **kwargs)
  File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/keras/engine/base_layer.py", line 743, in __call__
    self._assert_input_compatibility(inputs)
  File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/keras/engine/base_layer.py", line 1488, in _assert_input_compatibility
    str(x.shape.as_list()))
ValueError: Input 0 of layer conv2d_1 is incompatible with the layer: expected ndim=4, found ndim=3. Full shape received: [None, 80, 1]
yanggeng1995 commented 5 years ago

I have fixed this bug, you can try again

ZohaibAhmed commented 5 years ago

@yanggeng1995 Still the same error after removing the transpose.

yanggeng1995 commented 5 years ago

There was no test before, but there should be no problem this time.You try again