MCPcopy Create free account
hub / github.com/VisionXLab/OF-Diff / __init__

Method __init__

ldm/modules/diffusionmodules/model.py:76–85  ·  view source on GitHub ↗
(self, in_channels, with_conv)

Source from the content-addressed store, hash-verified

74
75class Downsample(nn.Module):
76 def __init__(self, in_channels, with_conv):
77 super().__init__()
78 self.with_conv = with_conv
79 if self.with_conv:
80 # no asymmetric padding in torch conv, must do it ourselves
81 self.conv = torch.nn.Conv2d(in_channels,
82 in_channels,
83 kernel_size=3,
84 stride=2,
85 padding=0)
86
87 def forward(self, x):
88 if self.with_conv:

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected