MCPcopy Index your code
hub / github.com/openai/guided-diffusion / __init__

Method __init__

guided_diffusion/unet.py:91–98  ·  view source on GitHub ↗
(self, channels, use_conv, dims=2, out_channels=None)

Source from the content-addressed store, hash-verified

89 """
90
91 def __init__(self, channels, use_conv, dims=2, out_channels=None):
92 super().__init__()
93 self.channels = channels
94 self.out_channels = out_channels or channels
95 self.use_conv = use_conv
96 self.dims = dims
97 if use_conv:
98 self.conv = conv_nd(dims, self.channels, self.out_channels, 3, padding=1)
99
100 def forward(self, x):
101 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.85

Tested by

no test coverage detected