diff --git a/torch/distributions/constraints.py b/torch/distributions/constraints.py index 9017abc1cc38..be36cb5b880e 100644 --- a/torch/distributions/constraints.py +++ b/torch/distributions/constraints.py @@ -131,7 +131,7 @@ def __call__(self, fn): """ Support for syntax to customize static attributes:: - @constraints.dependent_dependent(is_discrete=True, event_dim=1) + @constraints.dependent_property(is_discrete=True, event_dim=1) def support(self): ... """ diff --git a/torch/distributions/uniform.py b/torch/distributions/uniform.py index 8912de0c8bca..edaf5abf77a5 100644 --- a/torch/distributions/uniform.py +++ b/torch/distributions/uniform.py @@ -22,8 +22,7 @@ class Uniform(Distribution): high (float or Tensor): upper range (exclusive). """ # TODO allow (loc,scale) parameterization to allow independent constraints. - arg_constraints = {'low': constraints.dependent(is_discrete=False, event_dim=0), - 'high': constraints.dependent(is_discrete=False, event_dim=0)} + arg_constraints = {'low': constraints.dependent, 'high': constraints.dependent} has_rsample = True @property