MCPcopy Create free account
hub / github.com/BorealisAI/scaleformer / encode

Method encode

layers/utils.py:331–333  ·  view source on GitHub ↗
(self, x)

Source from the content-addressed store, hash-verified

329 self.eps = eps
330
331 def encode(self, x):
332 x = (x - self.mean) / (self.std + self.eps)
333 return x
334
335 def decode(self, x, sample_idx=None):
336 x = (x * (self.std + self.eps)) + self.mean

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected