


m = HalfCauchy(torch.tensor([1.0]))
      >>> m.sample()  # half-cauchy distributed with scale=1
      tensor([ 2.3214])



Parameters:
      scale (float or Tensor) -- scale of the full Cauchy
      distribution
arg_constraints: Dict[str, constraints.Constraint] = {'scale': GreaterThan(lower_bound=0.0)}
cdf(value)
entropy()
expand(batch_shape, _instance=None)
has_rsample = True
icdf(prob)
log_prob(value)
property mean
property mode
property scale
support = GreaterThanEq(lower_bound=0.0)
property variance
HalfNormal
class torch.distributions.half_normal.HalfNormal(scale, validate_args=None)
Bases: "TransformedDistribution"
Creates a half-normal distribution parameterized by scale where:
  X ~ Normal(0, scale)
  Y = |X| ~ HalfNormal(scale)

Example:
  >>> m = HalfNormal(torch.tensor([1.0]))
  >>> m.sample()  # half-normal distributed with scale=1
  tensor([ 0.1046])

Parameters: