MCPcopy Create free account
hub / github.com/CompVis/diff2flow / decode

Method decode

diff2flow/tiny_autoencoder.py:76–82  ·  view source on GitHub ↗

Args: z: torch.Tensor, shape (b, latent_channels, h, w)

(self, z)

Source from the content-addressed store, hash-verified

74
75 @torch.no_grad()
76 def decode(self, z):
77 """
78 Args:
79 z: torch.Tensor, shape (b, latent_channels, h, w)
80 """
81 # scale to [-1, 1]
82 return self.decoder(z).mul(2).sub(1)
83
84 def guess_latent_channels(self, encoder_path):
85 """guess latent channel count based on encoder filename"""

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected