There was an error while loading. Please reload this page.
1 parent 2971ba4 commit 71693ccCopy full SHA for 71693cc
python/paddle/distribution/dirichlet.py
@@ -71,7 +71,7 @@ class Dirichlet(exponential_family.ExponentialFamily):
71
"""
72
73
def __init__(self, concentration):
74
- if concentration.dim() < 1 or math.prod(concentration.shape) < 1:
+ if concentration.dim() < 1 or math.prod(concentration.shape) == 0:
75
# 0-dim tensor or 0-sized tensor is invalid
76
raise ValueError(
77
"`concentration` parameter must be at least one dimensional"
0 commit comments