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

Method __init__

layers/utils.py:324–329  ·  view source on GitHub ↗
(self, x, eps=0.00001)

Source from the content-addressed store, hash-verified

322# normalization, Gaussian
323class GaussianNormalizer(object):
324 def __init__(self, x, eps=0.00001):
325 super(GaussianNormalizer, self).__init__()
326
327 self.mean = torch.mean(x)
328 self.std = torch.std(x)
329 self.eps = eps
330
331 def encode(self, x):
332 x = (x - self.mean) / (self.std + self.eps)

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected