Caffe2 - Python API
A deep learning, cross platform ML framework
List of all members
torch.distributions.constraints._DependentProperty Class Reference
Inheritance diagram for torch.distributions.constraints._DependentProperty:
torch.distributions.constraints._Dependent torch.distributions.constraints.Constraint

Additional Inherited Members

- Public Member Functions inherited from torch.distributions.constraints._Dependent
def check (self, x)
 
- Public Member Functions inherited from torch.distributions.constraints.Constraint
def check (self, value)
 
def __repr__ (self)
 

Detailed Description

Decorator that extends @property to act like a `Dependent` constraint when
called on a class and act like a property when called on an object.

Example::

    class Uniform(Distribution):
        def __init__(self, low, high):
            self.low = low
            self.high = high
        @constraints.dependent_property
        def support(self):
            return constraints.interval(self.low, self.high)

Definition at line 79 of file constraints.py.


The documentation for this class was generated from the following file: