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

Method __init__

usr/diff/shallow_diffusion_tts.py:116–125  ·  view source on GitHub ↗
(self, dim, dim_out, *, time_emb_dim, groups=8)

Source from the content-addressed store, hash-verified

114
115class ResnetBlock(nn.Module):
116 def __init__(self, dim, dim_out, *, time_emb_dim, groups=8):
117 super().__init__()
118 self.mlp = nn.Sequential(
119 Mish(),
120 nn.Linear(time_emb_dim, dim_out)
121 )
122
123 self.block1 = Block(dim, dim_out)
124 self.block2 = Block(dim_out, dim_out)
125 self.res_conv = nn.Conv2d(dim, dim_out, 1) if dim != dim_out else nn.Identity()
126
127 def forward(self, x, time_emb):
128 h = self.block1(x)

Callers

nothing calls this directly

Calls 3

MishClass · 0.70
BlockClass · 0.70
__init__Method · 0.45

Tested by

no test coverage detected