From 3c761465c78261cf5a45d0081eb70525e37ed0d6 Mon Sep 17 00:00:00 2001 From: Wenyu Date: Fri, 23 Jul 2021 15:50:48 +0800 Subject: [PATCH] fix prod (#3762) --- ppdet/modeling/initializer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ppdet/modeling/initializer.py b/ppdet/modeling/initializer.py index f7e83098b..6171270e4 100644 --- a/ppdet/modeling/initializer.py +++ b/ppdet/modeling/initializer.py @@ -267,7 +267,7 @@ def linear_init_(module): def conv_init_(module): - bound = 1 / math.sqrt(math.prod(module.weight.shape[1:])) + bound = 1 / np.sqrt(np.prod(module.weight.shape[1:])) uniform_(module.weight, -bound, bound) uniform_(module.bias, -bound, bound) -- GitLab