MCPcopy Create free account
hub / github.com/KeepTryingTo/Pytorch-GAN / forward

Method forward

PyTorch-VAE/models/lvae.py:32–41  ·  view source on GitHub ↗
(self, input: Tensor)

Source from the content-addressed store, hash-verified

30 self.encoder_var = nn.Linear(out_channels * out_size ** 2, latent_dim)
31
32 def forward(self, input: Tensor) -> Tensor:
33 result = self.encoder(input)
34 h = torch.flatten(result, start_dim=1)
35
36 # Split the result into mu and var components
37 # of the latent Gaussian distribution
38 mu = self.encoder_mu(h)
39 log_var = self.encoder_var(h)
40
41 return [result, mu, log_var]
42
43class LadderBlock(nn.Module):
44 def __init__(self,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected