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

Class Block

models/sr3_dwt.py:288–300  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

286
287
288class Block(nn.Module):
289 def __init__(self, dim, dim_out, groups=32, dropout=0):
290 super().__init__()
291 self.block = nn.Sequential(
292 nn.GroupNorm(groups, dim),
293 # nn.BatchNorm2d(dim),
294 Swish(),
295 nn.Dropout(dropout) if dropout != 0 else nn.Identity(),
296 nn.Conv2d(dim, dim_out, 3, padding=1),
297 )
298
299 def forward(self, x):
300 return self.block(x)
301
302
303class ResnetBlock(nn.Module):

Callers 2

__init__Method · 0.70
__init__Method · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected