MCPcopy Create free account
hub / github.com/ml-explore/mlx-examples / encode

Method encode

flux/flux/autoencoder.py:347–350  ·  view source on GitHub ↗
(self, x: mx.array)

Source from the content-addressed store, hash-verified

345 return new_weights
346
347 def encode(self, x: mx.array):
348 z = self.reg(self.encoder(x))
349 z = self.scale_factor * (z - self.shift_factor)
350 return z
351
352 def decode(self, z: mx.array):
353 z = z / self.scale_factor + self.shift_factor

Callers 1

__call__Method · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected