Skip to content

Commit

Permalink
Fix for issue apache#4831. The data_min_idx and data_max_idx were fli…
Browse files Browse the repository at this point in the history
  • Loading branch information
shoubhik committed May 12, 2020
1 parent c5a818e commit a982c6e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions python/tvm/relay/frontend/mxnet.py
Original file line number Diff line number Diff line change
Expand Up @@ -1218,6 +1218,7 @@ def _get_data_scale_and_zp(_data, _inputs,
""" Finds the Qnn params for the data expr. """
data_min = _inputs[_data_min_idx]
data_max = _inputs[_data_max_idx]
assert data_min <= data_max
data_dtype = _infer_type(_data).checked_type.dtype
assert data_dtype in {'int8', 'uint8'}
if data_min < 0.0:
Expand Down Expand Up @@ -1409,8 +1410,8 @@ def _parse():
###############################################
# Last 2 indexes are data min and max. If the conv has a sum, then last 2 indexes are
# for the second tensor. So, the data min max indexes are last 3 and 4
data_min_idx = -1
data_max_idx = -2
data_min_idx = -2
data_max_idx = -1
if has_sum:
data_min_idx = -4
data_max_idx = -3
Expand Down

0 comments on commit a982c6e

Please sign in to comment.