MCPcopy Create free account
hub / github.com/OpenDriveLab/ReSim / __init__

Method __init__

sat/sgm/modules/diffusionmodules/openaimodel.py:128–136  ·  view source on GitHub ↗
(self, channels, use_conv, dims=2, out_channels=None, padding=1, third_up=False)

Source from the content-addressed store, hash-verified

126 """
127
128 def __init__(self, channels, use_conv, dims=2, out_channels=None, padding=1, third_up=False):
129 super().__init__()
130 self.channels = channels
131 self.out_channels = out_channels or channels
132 self.use_conv = use_conv
133 self.dims = dims
134 self.third_up = third_up
135 if use_conv:
136 self.conv = conv_nd(dims, self.channels, self.out_channels, 3, padding=padding)
137
138 def forward(self, x):
139 assert x.shape[1] == self.channels

Callers

nothing calls this directly

Calls 2

conv_ndFunction · 0.85
__init__Method · 0.45

Tested by

no test coverage detected