MCPcopy Create free account
hub / github.com/VisionXLab/OF-Diff / forward

Method forward

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

Source from the content-addressed store, hash-verified

99 return dec
100
101 def forward(self, input, sample_posterior=True):
102 posterior = self.encode(input)
103 if sample_posterior:
104 z = posterior.sample()
105 else:
106 z = posterior.mode()
107 dec = self.decode(z)
108 return dec, posterior
109
110 def get_input(self, batch, k):
111 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