MCPcopy Create free account
hub / github.com/MaureenZOU/TSAM / __call__

Method __call__

src/data_loader/transform.py:71–79  ·  view source on GitHub ↗
(self, tensor)

Source from the content-addressed store, hash-verified

69 self.std = std
70
71 def __call__(self, tensor):
72 rep_mean = self.mean * (tensor.size()[0] // len(self.mean))
73 rep_std = self.std * (tensor.size()[0] // len(self.std))
74
75 # TODO: make efficient
76 for t, m, s in zip(tensor, rep_mean, rep_std):
77 t.sub_(m).div_(s)
78
79 return tensor
80
81
82class GroupScale(object):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected