-
Notifications
You must be signed in to change notification settings - Fork 2.7k
fix verify bugs #547
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
fix verify bugs #547
Conversation
tools/pytorch2onnx.py
Outdated
@@ -96,13 +96,16 @@ def _prepare_input_img(img_path, | |||
return mm_inputs | |||
|
|||
|
|||
def _update_input_img(img_list, img_meta_list): | |||
def _update_input_img(img_list, img_meta_list, update_origin=False): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does update_origin
means?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ori_shape
in img_meta is used to rescale output to origin shape.
_update_input_img
will update img_meta_list
according to img_list
. And this flag is used to control if the segmentator needs to rescale according to the input tensor shape.
@@ -220,7 +223,7 @@ def pytorch2onnx(model, | |||
|
|||
# update img_meta | |||
img_list, img_meta_list = _update_input_img( | |||
img_list, img_meta_list) | |||
img_list, img_meta_list, test_mode == 'whole') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why arg is test_mode == 'whole'
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The input tensor has been interpolated with scale_factor=1.5 to test dynamic shape support.
We only support dynamic shape on these whole mode
models.
Codecov Report
@@ Coverage Diff @@
## master #547 +/- ##
==========================================
- Coverage 86.79% 86.76% -0.04%
==========================================
Files 101 101
Lines 5249 5250 +1
Branches 848 849 +1
==========================================
- Hits 4556 4555 -1
- Misses 533 535 +2
Partials 160 160
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
* fix verify bugs * rename args
* resolve comments * update changelog * init stdet_demo * frame extraction & human det * update code * rename label_map.txt as k400_label_map.txt * finish demo * after check * resolve comments & + docstring
Hi
This PR fixes
shape mismatch
when verifying thewhole mode
model inpytorch2onnx
.