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

Method __init__

LDPS_Graph/layers/utils.py:324–330  ·  view source on GitHub ↗
(self, x, low=0.0, high=1.0)

Source from the content-addressed store, hash-verified

322# normalization, scaling by range
323class RangeNormalizer(object):
324 def __init__(self, x, low=0.0, high=1.0):
325 super(RangeNormalizer, self).__init__()
326 mymin = torch.min(x, 0)[0].view(-1)
327 mymax = torch.max(x, 0)[0].view(-1)
328
329 self.a = (high - low)/(mymax - mymin)
330 self.b = -self.a*mymax + high
331
332 def encode(self, x):
333 s = x.size()

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected