Update attentions.py

This commit is contained in:
Stardust·减
2023-08-21 12:49:20 +08:00
committed by GitHub
parent c60b20e3cc
commit ab78ea558a

View File

@@ -68,8 +68,6 @@ class Encoder(nn.Module):
self.ffn_layers.append(FFN(hidden_channels, hidden_channels, filter_channels, kernel_size, p_dropout=p_dropout))
self.norm_layers_2.append(LayerNorm(hidden_channels))
def forward(self, x, x_mask, g=None):
if g is not None:
g = self.cond_layer(g)
attn_mask = x_mask.unsqueeze(2) * x_mask.unsqueeze(-1)
x = x * x_mask
for i in range(self.n_layers):