Hello, I would like to use the Cumulative Distribution Function for Gaussian Distribution.
I know it can be get it as:
fn = lambda x : torch.nn.GELU()(x) / x
But I am afraid it is not numerical stable. Any other suggestions? Thanks!
Hello, I would like to use the Cumulative Distribution Function for Gaussian Distribution.
I know it can be get it as:
fn = lambda x : torch.nn.GELU()(x) / x
But I am afraid it is not numerical stable. Any other suggestions? Thanks!
distributions/normal.py has it:
return 0.5 * (1 + torch.erf((value - self.loc) * self.scale.reciprocal() / math.sqrt(2)))