From d50b99270848c7186d45f674431aaab882b4a6b3 Mon Sep 17 00:00:00 2001 From: Fritz Obermeyer Date: Thu, 14 Jan 2021 13:25:33 -0500 Subject: [PATCH] Simplify --- torch/distributions/constraints.py | 2 +- torch/distributions/uniform.py | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) 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