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

Class Block

usr/diff/diffusion.py:102–112  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

100# building block modules
101
102class Block(nn.Module):
103 def __init__(self, dim, dim_out, groups=8):
104 super().__init__()
105 self.block = nn.Sequential(
106 nn.Conv2d(dim, dim_out, 3, padding=1),
107 nn.GroupNorm(groups, dim_out),
108 Mish()
109 )
110
111 def forward(self, x):
112 return self.block(x)
113
114
115class ResnetBlock(nn.Module):

Callers 1

__init__Method · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected