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

Method __init__

lib/network_auxi.py:334–342  ·  view source on GitHub ↗
(self, inchannels, outchannels)

Source from the content-addressed store, hash-verified

332
333class FeatureFusion(nn.Module):
334 def __init__(self, inchannels, outchannels):
335 super(FeatureFusion, self).__init__()
336 self.conv = ResidualConv(inchannels=inchannels)
337 # NN.BatchNorm2d
338 self.up = nn.Sequential(ResidualConv(inchannels=inchannels),
339 nn.ConvTranspose2d(in_channels=inchannels, out_channels=outchannels, kernel_size=3,
340 stride=2, padding=1, output_padding=1),
341 nn.BatchNorm2d(num_features=outchannels),
342 nn.ReLU(inplace=True))
343
344 def forward(self, lowfeat, highfeat):
345 return self.up(highfeat + self.conv(lowfeat))

Callers

nothing calls this directly

Calls 2

ResidualConvClass · 0.85
__init__Method · 0.45

Tested by

no test coverage detected