MCPcopy Create free account
hub / github.com/thygate/stable-diffusion-webui-depthmap-script / __init__

Method __init__

dmidas/backbones/next_vit.py:134–141  ·  view source on GitHub ↗
(self, out_channels, head_dim)

Source from the content-addressed store, hash-verified

132 Multi-Head Convolutional Attention
133 """
134 def __init__(self, out_channels, head_dim):
135 super(MHCA, self).__init__()
136 norm_layer = partial(nn.BatchNorm2d, eps=NORM_EPS)
137 self.group_conv3x3 = nn.Conv2d(out_channels, out_channels, kernel_size=3, stride=1,
138 padding=1, groups=out_channels // head_dim, bias=False)
139 self.norm = norm_layer(out_channels)
140 self.act = nn.ReLU(inplace=True)
141 self.projection = nn.Conv2d(out_channels, out_channels, kernel_size=1, bias=False)
142
143 def forward(self, x):
144 out = self.group_conv3x3(x)

Callers

nothing calls this directly

Calls 2

norm_layerFunction · 0.85
__init__Method · 0.45

Tested by

no test coverage detected