Unverified Commit ec3ab990 authored by yangarbiter's avatar yangarbiter Committed by GitHub
Browse files

Fix Tacotron2 Postnet forward (#1647)

parent df776150
...@@ -354,13 +354,11 @@ class _Postnet(nn.Module): ...@@ -354,13 +354,11 @@ class _Postnet(nn.Module):
x (Tensor): Tensor with shape (n_batch, ``n_mels``, max of ``mel_specgram_lengths``). x (Tensor): Tensor with shape (n_batch, ``n_mels``, max of ``mel_specgram_lengths``).
""" """
i = 0 for i, conv in enumerate(self.convolutions):
for conv in self.convolutions:
if i < self.n_convs - 1: if i < self.n_convs - 1:
x = F.dropout(torch.tanh(conv(x)), 0.5, training=self.training) x = F.dropout(torch.tanh(conv(x)), 0.5, training=self.training)
else: else:
x = F.dropout(conv(x), 0.5, training=self.training) x = F.dropout(conv(x), 0.5, training=self.training)
i += 1
return x return x
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment