未验证 提交 ba1dce0a 编写于 作者: Z Zhong Hui 提交者: GitHub

[BugFix] Fix illegal memory overflow for p_norm op (#49537)

上级 e8f4a327
......@@ -2644,8 +2644,9 @@ void PNormInferMeta(const MetaTensor& x,
if (reduce_dims.size() == 0) {
reduce_dims.emplace_back(1);
}
x_dim[axis] = 1;
}
x_dim[axis] = 1;
if (keepdim) {
out->set_dims(x_dim);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册