提交 e3677727 编写于 作者: C cc 提交者: GitHub

Fix bug in slice op when infer_flags is empyt, test=develop (#3625)

上级 b9a0148c
......@@ -43,7 +43,7 @@ bool SliceOp::InferShapeImpl() const {
CHECK_LT(param_.axes[i], in_dims.size()) << "The index of dimension in "
"axes must be less than the "
"size of input shape.";
if (param_.infer_flags[i] == -1) {
if (param_.infer_flags.size() > i && param_.infer_flags[i] == -1) {
out_dims[axes[i]] = -1;
} else {
// infer out_dim shape
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册