Skip to content

Commit

Permalink
make it static
Browse files Browse the repository at this point in the history
  • Loading branch information
masahi committed May 29, 2021
1 parent eb06393 commit 9dcd0f0
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions python/tvm/relay/frontend/tensorflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -810,13 +810,9 @@ def all_class_impl(
max_output_boxes_per_class,
iou_threshold,
score_threshold,
max_total_size.data.numpy().item(),
max_total_size,
output_format="tensorflow",
)
# return _expr.TupleWrapper(
# _expr.Tuple([indices, num_detections, num_detections, num_detections]), 4
# )

nmsed_box_indices = _op.take(indices, _op.const(1), axis=2)
nmsed_classes = _op.cast(_op.take(indices, _op.const(0), axis=2), "float32")
nmsed_boxes = _op.gather_nd(boxes, _op.expand_dims(nmsed_box_indices, axis=0), batch_dims=1)
Expand All @@ -832,7 +828,7 @@ def all_class_impl(

# Fill in invalid entries with 0
box_range = _op.arange(
_expr.const(0, dtype="int64"), _op.cast(max_total_size, "int64"), dtype="int64"
_op.const(0, dtype="int64"), _op.const(max_total_size, dtype="int64"), dtype="int64"
)
batch_size = indices_shape[0]

Expand Down Expand Up @@ -888,7 +884,7 @@ def _impl(inputs, attr, params, mod):
max_output_size,
iou_threshold,
score_threshold,
max_total_size,
max_total_size.data.numpy().item(),
attr["clip_boxes"],
mod,
)
Expand Down

0 comments on commit 9dcd0f0

Please sign in to comment.