pyro-ppl/pyro

Feature request: Prohibit passing negative numbers to plate sizes

Aperta

#3407 aperta il 24 ott 2024

 (0 commenti) (0 reazioni) (0 assegnatari)Python (981 fork)batch import
help wantedusability

Metriche repository

Star
 (8211 stelle)
Metriche merge PR
 (Merge medio 10g 19h) (1 PR mergiata in 30 g)

Descrizione

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.

Guida contributor