Args: z: Latent tensor of shape [B, in_channels, H', W'] Returns: Decoded image of shape [B, out_channels, H, W]
(self, z: torch.Tensor)
| 110 | ) |
| 111 | |
| 112 | def forward(self, z: torch.Tensor) -> torch.Tensor: |
| 113 | """ |
| 114 | Args: |
| 115 | z: Latent tensor of shape [B, in_channels, H', W'] |
| 116 | Returns: |
| 117 | Decoded image of shape [B, out_channels, H, W] |
| 118 | """ |
| 119 | # conv_in |
| 120 | h = self.conv_in(z) |
| 121 | |
| 122 | # mid block |
| 123 | h = self.mid_block(h) |
| 124 | |
| 125 | # up blocks |
| 126 | for up_block in self.up_blocks: |
| 127 | h = up_block(h) |
| 128 | |
| 129 | # output |
| 130 | h = self.conv_norm_out(h) |
| 131 | h = self.conv_act(h) |
| 132 | h = self.conv_out(h) |
| 133 | |
| 134 | return h |
nothing calls this directly
no outgoing calls
no test coverage detected