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

Method __init__

lib/network_auxi.py:289–304  ·  view source on GitHub ↗
(self, inchannels)

Source from the content-addressed store, hash-verified

287
288class ResidualConv(nn.Module):
289 def __init__(self, inchannels):
290 super(ResidualConv, self).__init__()
291 # NN.BatchNorm2d
292 self.conv = nn.Sequential(
293 # nn.BatchNorm2d(num_features=inchannels),
294 nn.ReLU(inplace=False),
295 # nn.Conv2d(in_channels=inchannels, out_channels=inchannels, kernel_size=3, padding=1, stride=1, groups=inchannels,bias=True),
296 # nn.Conv2d(in_channels=inchannels, out_channels=inchannels, kernel_size=1, padding=0, stride=1, groups=1,bias=True)
297 nn.Conv2d(in_channels=inchannels, out_channels=inchannels / 2, kernel_size=3, padding=1, stride=1,
298 bias=False),
299 nn.BatchNorm2d(num_features=inchannels / 2),
300 nn.ReLU(inplace=False),
301 nn.Conv2d(in_channels=inchannels / 2, out_channels=inchannels, kernel_size=3, padding=1, stride=1,
302 bias=False)
303 )
304 self.init_params()
305
306 def forward(self, x):
307 x = self.conv(x) + x

Callers

nothing calls this directly

Calls 2

init_paramsMethod · 0.95
__init__Method · 0.45

Tested by

no test coverage detected