pass x_mask to layer norm

This commit is contained in:
erogol 2020-08-17 10:58:49 +02:00
parent 53523eebbe
commit 7c2c4d6f27
2 changed files with 2 additions and 2 deletions

View File

@ -22,7 +22,7 @@ class PQMF(torch.nn.Module):
for k in range(N):
constant_factor = (2 * k + 1) * (np.pi /
(2 * N)) * (np.arange(taps + 1) -
((taps - 1) / 2))
((taps - 1) / 2)) # TODO: (taps - 1) -> taps
phase = (-1)**k * np.pi / 4
H[k] = 2 * QMF * np.cos(constant_factor + phase)

View File

@ -121,7 +121,7 @@ class Encoder(nn.Module):
1).to(x.dtype)
# pass encoder
for layer in self.encoder:
x = layer(x)
x = layer(x, x_mask)
# set duration predictor input
if g is not None:
g_exp = g.expand(-1, -1, x.size(-1))