Commit 7aece930 authored by baominghelly's avatar baominghelly
Browse files

Copy logic from main branch

parent 9a4fb9bb
......@@ -86,7 +86,7 @@ def rearrange_tensor(tensor, new_strides):
left = 0
right = 0
for i in range(len(shape)):
if new_strides[i] > 0:
if new_strides[i] >= 0:
new_size[i] = (shape[i] - 1) * new_strides[i] + 1
right += new_strides[i] * (shape[i] - 1)
else: # TODO: Support negative strides in the future
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment