(self, input: Tensor)
| 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 | |
| 43 | class LadderBlock(nn.Module): |
| 44 | def __init__(self, |
nothing calls this directly
no outgoing calls
no test coverage detected