toshas / torch_truncnorm

Truncated Normal Distribution in PyTorch
BSD 3-Clause "New" or "Revised" License
79 stars 13 forks source link

Make one sided truncated normal distributions differentiable #10

Open BenZickel opened 10 months ago

BenZickel commented 10 months ago

Problem

One sided truncated normal distributions are not differentiable with respect to their parameters.

Solution

Add explicit handling of truncated normal distributions when calculating the probability density and cumulative distribution function.