未验证 提交 40436c83 编写于 作者: W Wenyu 提交者: GitHub

fix prod (#3763)

上级 b42baeb8
......@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册