MCPcopy Index your code
hub / github.com/CompVis/diff2flow / __init__

Method __init__

diff2flow/models/unet/openaimodel.py:103–110  ·  view source on GitHub ↗
(self, channels, use_conv, dims=2, out_channels=None, padding=1)

Source from the content-addressed store, hash-verified

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

Callers 9

__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