Skip to content

Commit 4a03f6a

Browse files
authored
fix (#102)
Signed-off-by: haoshengqiang <haoshengqiang79@163.com> Signed-off-by: haoshengqiang <haoshengqiang79@163.com>
1 parent be76e92 commit 4a03f6a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

onnxoptimizer/passes/eliminate_shape_gather.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ struct EliminateShapeGather final : public PredicateBasedPass {
4848

4949
ONNX_ASSERT(indices_val < dims.size());
5050

51-
if (!dims[indices_val].is_int) {
51+
if (!dims[indices_val].is_int || dims[indices_val].dim == -1) {
5252
return false;
5353
}
5454

0 commit comments

Comments
 (0)