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

Class Block

models/unet_model_google.py:96–109  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

94
95
96class Block(nn.Module):
97 def __init__(self, dim, dim_out, groups=32, dropout=0):
98 super().__init__()
99 self.block = nn.Sequential(
100 # nn.BatchNorm2d(dim),
101 nn.GroupNorm(groups, dim),
102 # LayerNorm2d(dim),
103 Swish(),
104 nn.Dropout(dropout) if dropout != 0 else nn.Identity(),
105 nn.Conv2d(dim, dim_out, 3, padding=1),
106 )
107
108 def forward(self, x):
109 return self.block(x)
110
111
112class ResnetBlock(nn.Module):

Callers 2

__init__Method · 0.70
__init__Method · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected