pull/10/head
Eren Golge 2018-04-12 05:59:40 -07:00
parent bc90050ee9
commit 06d4b231e9
1 changed files with 1 additions and 6 deletions

View File

@ -285,12 +285,7 @@ class Decoder(nn.Module):
if greedy:
memory_input = outputs[-1]
else:
combine prev. model output and prev. real target
memory_input = torch.div(outputs[-1] + memory[t-1], 2.0)
noise = torch.autograd.Variable(
memory_input.data.new(memory_input.size()).normal_(0.0, 2.0))
memory_input = memory_input + noise
memory_input = memory[t-1]
# Prenet
processed_memory = self.prenet(memory_input)
# Attention RNN