pyro-ppl/pyro

Feature request: Prohibit passing negative numbers to plate sizes

Open

#3,407 建立於 2024年10月24日

在 GitHub 查看
 (0 留言) (0 反應) (0 負責人)Python (8,211 star) (981 fork)batch import
help wantedusability

描述

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.

貢獻者指南