MCPcopy Create free account
hub / github.com/Anoise/WTFlib / __init__

Method __init__

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

Source from the content-addressed store, hash-verified

258# normalization, pointwise gaussian
259class UnitGaussianNormalizer(object):
260 def __init__(self, x, eps=0.00001):
261 super(UnitGaussianNormalizer, self).__init__()
262
263 # x could be in shape of ntrain*n or ntrain*T*n or ntrain*n*T
264 self.mean = torch.mean(x, 0)
265 self.std = torch.std(x, 0)
266 self.eps = eps
267
268 def encode(self, x):
269 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