Skip to content
This repository was archived by the owner on Jun 8, 2023. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions python/conformance/diopi_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -3193,10 +3193,7 @@ def pad(input, pad, mode='constant', value=None):
"Padding length must be equal or more than length of input"
paded_length = len(pad) // 2
for i in range(paded_length):
if len(pad) <= len(sizeO):
pad_idx = paded_length - i
else:
pad_idx = i + 1
pad_idx = i + 1
sizeO[-pad_idx] += (pad[2 * i] + pad[2 * i + 1])
pad = Sizes(pad)
if value is None and mode == 'constant':
Expand Down