MCPcopy Create free account
hub / github.com/geekcomputers/Python / __init__

Method __init__

ML/src/python/neuralforge/data/transforms.py:82–84  ·  view source on GitHub ↗
(self, mean: float = 0.0, std: float = 0.1)

Source from the content-addressed store, hash-verified

80
81class GaussianNoise:
82 def __init__(self, mean: float = 0.0, std: float = 0.1):
83 self.mean = mean
84 self.std = std
85
86 def __call__(self, tensor):
87 return tensor + torch.randn(tensor.size()) * self.std + self.mean

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected