未验证 提交 94249f5e 编写于 作者: Z zyfncg 提交者: GitHub

fix set_value (#43694)

上级 31cbf63e
......@@ -78,6 +78,9 @@ inline void CheckAndUpdateSliceAttrs(const DDim in_dims,
// dim_value-1
// "end is -1" means contain the 0-th element of this axis.
start = std::min(start, dim_value - 1);
if (end < -1) {
end += dim_value;
}
end = std::max(end, static_cast<T>(-1));
PADDLE_ENFORCE_GE(
start,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册