MCPcopy Create free account
hub / github.com/CompVis/diff2flow / __init__

Method __init__

diff2flow/kl_autoencoder.py:104–109  ·  view source on GitHub ↗
(self, in_channels, with_conv)

Source from the content-addressed store, hash-verified

102
103class Downsample(nn.Module):
104 def __init__(self, in_channels, with_conv):
105 super().__init__()
106 self.with_conv = with_conv
107 if self.with_conv:
108 # no asymmetric padding in torch conv, must do it ourselves
109 self.conv = nn.Conv2d(in_channels, in_channels, kernel_size=3, stride=2, padding=0)
110
111 def forward(self, x):
112 if self.with_conv:

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected