MCPcopy
hub / github.com/ermongroup/ddim / __init__

Method __init__

models/diffusion.py:56–65  ·  view source on GitHub ↗
(self, in_channels, with_conv)

Source from the content-addressed store, hash-verified

54
55class Downsample(nn.Module):
56 def __init__(self, in_channels, with_conv):
57 super().__init__()
58 self.with_conv = with_conv
59 if self.with_conv:
60 # no asymmetric padding in torch conv, must do it ourselves
61 self.conv = torch.nn.Conv2d(in_channels,
62 in_channels,
63 kernel_size=3,
64 stride=2,
65 padding=0)
66
67 def forward(self, x):
68 if self.with_conv:

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected