tacotron icon indicating copy to clipboard operation
tacotron copied to clipboard

Where do Timesteps = 155 come from?

Open onyedikilo opened this issue 7 years ago • 5 comments

I trained the model with various sound files, it always complains about the size of the timesteps when evaluating, i need to change it everytime finding the value from the debugger error.

Is it me or everyone does the same?

Where does that number come from? Default being 155?

onyedikilo avatar May 26 '17 17:05 onyedikilo

It's not just you. I had to change the timesteps too to make it able to evaluate here. I don't know how to calculate it though

marcossilva avatar May 26 '17 17:05 marcossilva

@marcossilva You are really active and I also want to make this code better so we can use it for our purposes. Do you want to keep in comunication so we can create the "TTS" framework and leave it there for others? My linkedin profile is https://www.linkedin.com/in/abaezsuarez/ Contact me if interested.

basuam avatar May 26 '17 18:05 basuam

It's becaue I use dynamic padding in training and evaluation. I found TensorFlow can't infer the timesteps of the batch so I just precalculated and fixed them explicitly. You can change them seeing the error message. I'll fix this soon. Sorry for the inconvenience.

Kyubyong avatar May 26 '17 22:05 Kyubyong

@Kyubyong could you explain how it's calculated? It's based on the file lenght, its sampling rate?

marcossilva avatar May 26 '17 23:05 marcossilva

Ok. First, pay attention the line 196 in train.py.

x, y, z= tf.train.batch([x, y, z], shapes=[(None,), (None, hp.n_mels*hp.r), (None, (1+hp.n_fft//2)hp.r)], num_threads=32, batch_size=hp.batch_size, capacity=hp.batch_size32,
dynamic_pad=True)

The last option means the size of the time dimension (=length, here) of the batch varies. For example, let's assume the batch size is 4, and the length of those four is 1, 2, 3, and 4, respectively. Then the length of the batch becomes 4, and paddings are attached for the first 3 samples.

I realized I can't get retrieve the length by tf.get_shape(). (Consult the concept of the static and dynamic shape) So simply I just run eval.py and see the error message like the shape mismathces blah blah ... you tried to feed xxx into 155, which is the true size, then change the timesteps if necessary.

I know this is on an ad hoc basis. I think I have to make placeholders for evaluation, not queues.

Kyubyong avatar May 27 '17 00:05 Kyubyong