Skip to content

Commit

Permalink
fix (#4319)
Browse files Browse the repository at this point in the history
  • Loading branch information
geohotstan committed Apr 28, 2024
1 parent 8d1649d commit bc36940
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion extra/onnx.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ def fetch_tensor(x: str):
starts, ends = inp[1:3]
axes = safe_numpy(Tensor.arange(inp[0].ndim) if len(inp) <= 3 else inp[3].cast(dtypes.int32)).tolist()
steps = safe_numpy(inp[4].cast(dtypes.int32)).tolist() if len(inp) > 4 else [1]*inp[0].ndim
starts, ends = safe_numpy(starts.ceil().cast(dtypes.int32)).tolist(), safe_numpy(ends.ceil().cast(dtypes.int32)).tolist()
starts, ends = safe_numpy(starts).tolist(), safe_numpy(ends).tolist()
arg = [(0,x,1) for x in inp[0].shape]
for i, axis in enumerate(axes):
axis = int(axis) + inp[0].ndim if axis < 0 else int(axis)
Expand Down

0 comments on commit bc36940

Please sign in to comment.