MCPcopy Create free account
hub / github.com/dek924/PerX2CT / __init__

Method __init__

taming/modules/diffusionmodules/model.py:57–66  ·  view source on GitHub ↗
(self, in_channels, with_conv)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected