Skip to content

Commit 71693cc

Browse files
committed
fix dirichlet
1 parent 2971ba4 commit 71693cc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

python/paddle/distribution/dirichlet.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ class Dirichlet(exponential_family.ExponentialFamily):
7171
"""
7272

7373
def __init__(self, concentration):
74-
if concentration.dim() < 1 or math.prod(concentration.shape) < 1:
74+
if concentration.dim() < 1 or math.prod(concentration.shape) == 0:
7575
# 0-dim tensor or 0-sized tensor is invalid
7676
raise ValueError(
7777
"`concentration` parameter must be at least one dimensional"

0 commit comments

Comments
 (0)