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

Method forward

diff2flow/kl_autoencoder.py:111–118  ·  view source on GitHub ↗
(self, x)

Source from the content-addressed store, hash-verified

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:
113 pad = (0,1,0,1)
114 x = nn.functional.pad(x, pad, mode="constant", value=0)
115 x = self.conv(x)
116 else:
117 x = nn.functional.avg_pool2d(x, kernel_size=2, stride=2)
118 return x
119
120
121class ResnetBlock(nn.Module):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected