MCPcopy Create free account
hub / github.com/alipay/RGSL / transform

Method transform

lib/normalization.py:60–61  ·  view source on GitHub ↗
(self, data)

Source from the content-addressed store, hash-verified

58 self.max = max
59
60 def transform(self, data):
61 return ((data - self.min) / (self.max - self.min)) * 2. - 1.
62
63 def inverse_transform(self, data):
64 if type(data) == torch.Tensor and type(self.min) == np.ndarray:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected