echuraev commented on code in PR #15752:
URL: https://github.com/apache/tvm/pull/15752#discussion_r1327008892
##########
python/tvm/relay/frontend/pytorch.py:
##########
@@ -2977,7 +2977,12 @@ def nll_loss(self, inputs, input_types):
def flip(self, inputs, input_types):
data = inputs[0]
axis = inputs[1]
- return _op.transform.reverse(data, axis=axis[0])
+ for i, ax in enumerate(axis):
+ if i == 0:
+ out = _op.reverse(data, ax)
+ else:
+ out = _op.reverse(out, ax)
Review Comment:
Want to suggest small refactoring:
```suggestion
out = data
for ax in axis:
out = _op.reverse(out, ax)
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]