You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2022/08/29 10:29:17 UTC

[GitHub] [tvm] czh978 commented on pull request #12593: [Frontend][TFLite] fix detection_postprocess's non_max_suppression_attrs["force_suppress"]

czh978 commented on PR #12593:
URL: https://github.com/apache/tvm/pull/12593#issuecomment-1230099126

   > Thanks for the fix @czh978.
   > 
   > Do you mind providing some context on why `force_supress` needs to be set this way? Can you give one example of something that wasn't working before this change, and works after the change?
   https://github.com/apache/tvm/blob/3d41ac3a9ab58ba5f7d3182e6afe915924568f8d/python/tvm/relay/frontend/tflite.py#L3278-L3284
   The value of use_regular_nms is always Flase,becasue use_regular_nms=True is not yet supported in tvm。
   https://github.com/tensorflow/tensorflow/blob/47c541330813f575057d7af90ef55985baca87eb/tensorflow/lite/kernels/detection_postprocess.cc#L882-L887
   The result will suppress all detections regardless of class_id in tflite,when the value of use_regular_nms is always Flase.
   Therefore,the value of force_suppress should be true.
   [tflite_graph_with_postprocess.zip](https://github.com/apache/tvm/files/9443753/tflite_graph_with_postprocess.zip)
   There is a model,you can try adjust the code in test_forward.py of tflite,where is in
   https://github.com/apache/tvm/blob/3d41ac3a9ab58ba5f7d3182e6afe915924568f8d/tests/python/frontend/tflite/test_forward.py#L4309-L4336
   there is my example:
   ![1661768456(1)](https://user-images.githubusercontent.com/41666381/187181254-057970e1-9cee-4837-bf06-4f835ac9755f.png)
   It will get a Mismatched elements.


-- 
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: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org