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

Method __init__

lib/network_auxi.py:101–117  ·  view source on GitHub ↗
(self, inchannels, midchannels=512)

Source from the content-addressed store, hash-verified

99
100class FTB(nn.Module):
101 def __init__(self, inchannels, midchannels=512):
102 super(FTB, self).__init__()
103 self.in1 = inchannels
104 self.mid = midchannels
105 self.conv1 = nn.Conv2d(in_channels=self.in1, out_channels=self.mid, kernel_size=3, padding=1, stride=1,
106 bias=True)
107 # NN.BatchNorm2d
108 self.conv_branch = nn.Sequential(nn.ReLU(inplace=True), \
109 nn.Conv2d(in_channels=self.mid, out_channels=self.mid, kernel_size=3,
110 padding=1, stride=1, bias=True), \
111 nn.BatchNorm2d(num_features=self.mid), \
112 nn.ReLU(inplace=True), \
113 nn.Conv2d(in_channels=self.mid, out_channels=self.mid, kernel_size=3,
114 padding=1, stride=1, bias=True))
115 self.relu = nn.ReLU(inplace=True)
116
117 self.init_params()
118
119 def forward(self, x):
120 x = self.conv1(x)

Callers

nothing calls this directly

Calls 2

init_paramsMethod · 0.95
__init__Method · 0.45

Tested by

no test coverage detected