a347c747df8302acc0007a26f23ecf3355a5bef9,torch/distributions/transforms.py,ComposeTransform,domain,#ComposeTransform#,278
Before Change
def domain(self):
if not self.parts:
return constraints.real
return self.parts[0].domain
@constraints.dependent_property
def codomain(self):
if not self.parts:
After Change
def domain(self):
if not self.parts:
return constraints.real
domain = self.parts[0].domain
// Adjust event_dim to be maximum among all parts.
event_dim = self.parts[-1].codomain.event_dim
for part in reversed(self.parts):
event_dim += part.domain.event_dim - part.codomain.event_dim
event_dim = max(event_dim, part.domain.event_dim)
assert event_dim >= domain.event_dim
if event_dim > domain.event_dim:
domain = constraints.independent(domain, event_dim - domain.event_dim)
return domain
@constraints.dependent_property(is_discrete=False)
def codomain(self):
if not self.parts:
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 10
Instances Project Name: pytorch/pytorch
Commit Name: a347c747df8302acc0007a26f23ecf3355a5bef9
Time: 2021-01-25
Author: fritz.obermeyer@gmail.com
File Name: torch/distributions/transforms.py
Class Name: ComposeTransform
Method Name: domain
Project Name: pytorch/pytorch
Commit Name: a347c747df8302acc0007a26f23ecf3355a5bef9
Time: 2021-01-25
Author: fritz.obermeyer@gmail.com
File Name: torch/distributions/transformed_distribution.py
Class Name: TransformedDistribution
Method Name: support
Project Name: pytorch/pytorch
Commit Name: a347c747df8302acc0007a26f23ecf3355a5bef9
Time: 2021-01-25
Author: fritz.obermeyer@gmail.com
File Name: torch/distributions/transforms.py
Class Name: ComposeTransform
Method Name: codomain