Replies: 2 comments
-
|
>>> erogol |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
>>> damiankwasny95 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
>>> damiankwasny95
[May 28, 2019, 1:29am]
Hello. I have a trouble understanding a certain line in the decoder
forward method. This one:
https://github.com/mozilla/TTS/blob/924d6ad4e55e7763e61933bf3542dae1e892c369/layers/tacotron.py#L405-L417
memory_input, attention_rnn_hidden, decoder_rnn_hiddens, slash
current_context_vec, attention, attention_cum = self._init_states(inputs)
while True:
if t > 0:
if memory is None:
new_memory = outputs[-1]
else:
new_memory = memory[t - 1]
# Queuing if memory size defined else use previous prediction only.
if self.memory_size > 0:
memory_input = torch.cat([memory_input[:, self.r curl-run-all.sh discourse.mozilla.org html-to-markdown.sh ordered-posts ordered-posts~ TTS.cdx tts.commands tts-emails.txt TTS.pages tts-telegram.txt TTS.warc.gz self.memory_dim:].clone(), new_memory], dim=-1)
else:
memory_input = new_memory
So my question is, what does this concatenation do? We have a
new_memorywith size(B, r*memory_channels)and in stept=1whenwe can enter this part of the condition, the current
memory_inputweare trying to concatenate with is of shape
(B, memory_size*memory_channels). So in casememory_sizeis as adefault set to
memory_size = rthis line literally concatenates withan empty tensor. The only situation it actually concatenates with
something is only when
memory_sizeis higher thenr, am I right?shouldn't the condition be changed to
if self.memory_size > rorsomething like that in this case?
[Maybe I am missing something, but I am] stuck on this line for like more
then half an hours already and I cannot see a different solution. I
would be glad for clarification.
[This is an archived TTS discussion thread from discourse.mozilla.org/t/problem-with-understanding-part-of-the-decoder-logic]
Beta Was this translation helpful? Give feedback.
All reactions