MCPcopy Create free account
hub / github.com/LTH14/mar / encode

Method encode

models/vae.py:473–479  ·  view source on GitHub ↗
(self, x)

Source from the content-addressed store, hash-verified

471 print(f"Restored from {path}")
472
473 def encode(self, x):
474 h = self.encoder(x)
475 moments = self.quant_conv(h)
476 if not self.use_variational:
477 moments = torch.cat((moments, torch.ones_like(moments)), 1)
478 posterior = DiagonalGaussianDistribution(moments)
479 return posterior
480
481 def decode(self, z):
482 z = self.post_quant_conv(z)

Callers 2

train_one_epochFunction · 0.80
cache_latentsFunction · 0.80

Calls 1

Tested by

no test coverage detected