MCPcopy Create free account
hub / github.com/IceClear/StableSR / forward

Method forward

ldm/models/autoencoder.py:358–365  ·  view source on GitHub ↗
(self, input, sample_posterior=True)

Source from the content-addressed store, hash-verified

356 return dec
357
358 def forward(self, input, sample_posterior=True):
359 posterior = self.encode(input)
360 if sample_posterior:
361 z = posterior.sample()
362 else:
363 z = posterior.mode()
364 dec = self.decode(z)
365 return dec, posterior
366
367 def get_input(self, batch, k):
368 x = batch[k]

Callers

nothing calls this directly

Calls 4

encodeMethod · 0.95
decodeMethod · 0.95
sampleMethod · 0.45
modeMethod · 0.45

Tested by

no test coverage detected