MCPcopy Index your code
hub / github.com/VisionXLab/OF-Diff / __init__

Method __init__

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

Source from the content-addressed store, hash-verified

99 """
100
101 def __init__(self, channels, use_conv, dims=2, out_channels=None, padding=1):
102 super().__init__()
103 self.channels = channels
104 self.out_channels = out_channels or channels
105 self.use_conv = use_conv
106 self.dims = dims
107 if use_conv:
108 self.conv = conv_nd(dims, self.channels, self.out_channels, 3, padding=padding)
109
110 def forward(self, x):
111 assert x.shape[1] == self.channels

Callers 8

__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