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

Method encode

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

Source from the content-addressed store, hash-verified

356 self.b = -self.a*mymax + high
357
358 def encode(self, x):
359 s = x.size()
360 x = x.view(s[0], -1)
361 x = self.a*x + self.b
362 x = x.view(s)
363 return x
364
365 def decode(self, x):
366 s = x.size()

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected