csullivan commented on a change in pull request #6085:
URL: https://github.com/apache/incubator-tvm/pull/6085#discussion_r459608948



##########
File path: python/tvm/relay/frontend/tensorflow.py
##########
@@ -637,10 +637,11 @@ def _impl(inputs, attr, params, mod):
         iou_threshold = np.atleast_1d(inputs[3].data.asnumpy())[0]
         # score_threshold was introduced from V3
         score_threshold = np.atleast_1d(inputs[4].data.asnumpy())[0] if 
len(inputs) > 4 else 0.0
+        pad_output = 'pad_to_max_output_size'
 
         # Generate data with shape (1, num_anchors, 5)
         scores = AttrCvt(op_name="expand_dims",
-                         ignores=['T_threshold'],
+                         ignores=['T_threshold', pad_output],

Review comment:
       NMSv4 semantics allow for the user to define whether or not to pad the 
output using `pad_to_max_output_size=True/False`, see the example I provided in 
the test. Some pre-trained TF models use NMSv4 with 
pad_to_max_output_size=True, in which case, yes, they expect padding of the 
indices if the number of boxes is less than `max_output_size`, as well as an 
additional scalar output specifying the number of valid boxes.




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to