MCPcopy
hub / github.com/XPixelGroup/DiffBIR / forward

Method forward

diffbir/model/vae.py:584–591  ·  view source on GitHub ↗
(self, input, sample_posterior=True)

Source from the content-addressed store, hash-verified

582 return dec
583
584 def forward(self, input, sample_posterior=True):
585 posterior = self.encode(input)
586 if sample_posterior:
587 z = posterior.sample()
588 else:
589 z = posterior.mode()
590 dec = self.decode(z)
591 return dec, posterior

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