(self, x)
| 373 | self.cnt = 0 |
| 374 | |
| 375 | def __call__(self, x): |
| 376 | self.cnt += 1 |
| 377 | randn_combined = torch.zeros_like(x) |
| 378 | for seed, weight in zip(self.seeds, self.weights): |
| 379 | randn = np.random.RandomState(seed + self.cnt).randn(*x.shape) |
| 380 | randn = torch.from_numpy(randn, dtype=x.dtype, device=x.device) |
| 381 | randn_combined += randn * weight |
| 382 | randn_combined /= self.weight_square_sum_sqrt |
| 383 | return randn_combined |
nothing calls this directly
no outgoing calls
no test coverage detected