MCPcopy Create free account
hub / github.com/294coder/Dif-PAN / Block

Class Block

models/sr3.py:276–288  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

274
275
276class Block(nn.Module):
277 def __init__(self, dim, dim_out, groups=32, dropout=0):
278 super().__init__()
279 self.block = nn.Sequential(
280 nn.GroupNorm(groups, dim),
281 # nn.BatchNorm2d(dim),
282 Swish(),
283 nn.Dropout(dropout) if dropout != 0 else nn.Identity(),
284 nn.Conv2d(dim, dim_out, 3, padding=1),
285 )
286
287 def forward(self, x):
288 return self.block(x)
289
290
291class ResnetBlock(nn.Module):

Callers 2

__init__Method · 0.70
__init__Method · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected