pfhedge.nn.functional.npdf¶
- pfhedge.nn.functional.npdf(input)[source]¶
Returns a new tensor with the normal distribution function.
\[\text{npdf}(x) = \frac{1}{\sqrt{2 \pi}} e^{-\frac{x^2}{2}}\]- Parameters
input (torch.Tensor) – The input tensor.
- Returns
torch.Tensor
Examples
>>> from pfhedge.nn.functional import npdf >>> >>> input = torch.tensor([-1.0, 0.0, 10.0]) >>> npdf(input) tensor([2.4197e-01, 3.9894e-01, 7.6946e-23])