MCPcopy Create free account
hub / github.com/IceClear/StableSR / __init__

Method __init__

ldm/modules/diffusionmodules/openaimodel.py:155–162  ·  view source on GitHub ↗
(self, channels, use_conv, dims=2, out_channels=None, padding=1)

Source from the content-addressed store, hash-verified

153 """
154
155 def __init__(self, channels, use_conv, dims=2, out_channels=None, padding=1):
156 super().__init__()
157 self.channels = channels
158 self.out_channels = out_channels or channels
159 self.use_conv = use_conv
160 self.dims = dims
161 if use_conv:
162 self.conv = conv_nd(dims, self.channels, self.out_channels, 3, padding=padding)
163
164 def forward(self, x):
165 assert x.shape[1] == self.channels

Callers 11

__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45

Calls 1

conv_ndFunction · 0.90

Tested by

no test coverage detected