MCPcopy Create free account
hub / github.com/LTH14/mar / forward

Method forward

models/vae.py:45–52  ·  view source on GitHub ↗
(self, x)

Source from the content-addressed store, hash-verified

43 )
44
45 def forward(self, x):
46 if self.with_conv:
47 pad = (0, 1, 0, 1)
48 x = torch.nn.functional.pad(x, pad, mode="constant", value=0)
49 x = self.conv(x)
50 else:
51 x = torch.nn.functional.avg_pool2d(x, kernel_size=2, stride=2)
52 return x
53
54
55class ResnetBlock(nn.Module):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected