pyro-ppl/pyro
在 GitHub 查看Feature request: Prohibit passing negative numbers to plate sizes
Open
#3,407 建立於 2024年10月24日
help wantedusability
倉庫指標
- Star
- (8,211 star)
- PR 合併指標
- (平均合併 10天 19小時) (30 天內合併 1 個 PR)
描述
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.