MCPcopy Create free account
hub / github.com/MoonInTheRiver/DiffSinger / forward

Method forward

modules/fastspeech/pe.py:62–78  ·  view source on GitHub ↗

:param x: [B, C, T] :return: [B, C, T]

(self, x)

Source from the content-addressed store, hash-verified

60 self.relu = nn.ReLU()
61
62 def forward(self, x):
63 """
64
65 :param x: [B, C, T]
66 :return: [B, C, T]
67 """
68 x = self.conv(x)
69 if not isinstance(self.norm, str):
70 if self.norm == 'none':
71 pass
72 elif self.norm == 'ln':
73 x = self.norm(x.transpose(1, 2)).transpose(1, 2)
74 else:
75 x = self.norm(x)
76 x = self.relu(x)
77 x = self.dropout(x)
78 return x
79
80
81class ConvStacks(nn.Module):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected