Skip to content

Wrong codomain in LeakyReLUTransform #3268

@fariedabuzaid

Description

@fariedabuzaid

Issue Description

The codomain of a LeakyReLUTransform is set to positive but should be real.

Environment

  • Pyro version: 1.8.5

Code Snippet

From pyro/distributions/transforms/basic.py

class LeakyReLUTransform(Transform):
    """
    Bijective transform via the mapping :math:`y = \text{LeakyReLU}(x)`.
    """
    domain = constraints.real
    codomain = constraints.positive

Suggestion

class LeakyReLUTransform(Transform):
    """
    Bijective transform via the mapping :math:`y = \text{LeakyReLU}(x)`.
    """
    domain = constraints.real
    codomain = constraints.real

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugeasyhelp wantedIssues suitable for, and inviting external contributions

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions