Skip to content

Commit

Permalink
minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
masahi committed May 29, 2021
1 parent b02faae commit e71b922
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions python/tvm/relay/frontend/tensorflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -853,17 +853,17 @@ def _impl(inputs, attr, params, mod):
boxes = inputs[0]
scores = inputs[1]
try:
max_output_size = int(np.atleast_1d(inputs[2].data.asnumpy().astype("int64"))[0])
max_output_size = int(np.atleast_1d(inputs[2].data.numpy().astype("int64"))[0])
except Exception:
try:
max_output_size = (
_infer_value(inputs[2], params, mod).asnumpy().astype("int64").tolist()[0]
_infer_value(inputs[2], params, mod).numpy().astype("int64").tolist()[0]
)
except Exception:
max_output_size = inputs[2]
max_total_size = inputs[3]
iou_threshold = np.atleast_1d(inputs[4].data.asnumpy())[0]
score_threshold = np.atleast_1d(inputs[5].data.asnumpy())[0]
iou_threshold = np.atleast_1d(inputs[4].data.numpy())[0]
score_threshold = np.atleast_1d(inputs[5].data.numpy())[0]
if attr["pad_per_class"]:
raise tvm.error.OpAttributeUnImplemented(
"pad_per_class for CombinedNonMaxSuppression is not supported"
Expand Down
4 changes: 2 additions & 2 deletions python/tvm/topi/vision/nms.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
from tvm.te import hybrid
from tvm.tir import if_then_else

from ..sort import sort, argsort, topk
from ..sort import argsort, topk
from ..math import cast
from ..transform import reshape, arange, expand_dims, gather
from ..transform import reshape, gather
from .. import reduction
from ..scan import cumsum
from .nms_util import (
Expand Down

0 comments on commit e71b922

Please sign in to comment.