From 40436c8366747525971e3d5e659800b579a5df2c Mon Sep 17 00:00:00 2001 From: Wenyu Date: Mon, 26 Jul 2021 14:39:40 +0800 Subject: [PATCH] fix prod (#3763) --- 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