8 Creates a Chi2 distribution parameterized by shape parameter :attr:`df`. 9 This is exactly equivalent to ``Gamma(alpha=0.5*df, beta=0.5)`` 13 >>> m = Chi2(torch.tensor([1.0])) 14 >>> m.sample() # Chi2 distributed with shape df=1 18 df (float or Tensor): shape parameter of the distribution 20 arg_constraints = {
'df': constraints.positive}
22 def __init__(self, df, validate_args=None):
23 super(Chi2, self).__init__(0.5 * df, 0.5, validate_args=validate_args)
25 def expand(self, batch_shape, _instance=None):
27 return super(Chi2, self).expand(batch_shape, new)
31 return self.concentration * 2
def _get_checked_instance(self, cls, _instance=None)