MCPcopy Create free account
hub / github.com/cswry/VOSR / forward

Method forward

models/light_decoder.py:112–134  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected