diff --git a/ppdet/modeling/initializer.py b/ppdet/modeling/initializer.py index f7e83098b90fa930fcb1dfcce3961f7e0bfcd2ae..6171270e47a895e7ab5636220cb853c1a738a9b6 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)