未验证 提交 3c761465 编写于 作者: W Wenyu 提交者: GitHub

fix prod (#3762)

上级 8019fa9e
...@@ -267,7 +267,7 @@ def linear_init_(module): ...@@ -267,7 +267,7 @@ def linear_init_(module):
def conv_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.weight, -bound, bound)
uniform_(module.bias, -bound, bound) uniform_(module.bias, -bound, bound)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册