Skip to content

Feature request: Prohibit passing negative numbers to plate sizes #3407

@deoxyribose

Description

@deoxyribose

Issue Description

Plate primitives scale log-likelihood terms by size/batch_size. But plates allow negative numbers without a warning or assert.
Something like
assert size > 0
above https://github.com/pyro-ppl/pyro/blob/dev/pyro/primitives.py#L424
might be worth adding.

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedIssues suitable for, and inviting external contributionsusability

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions