-
Notifications
You must be signed in to change notification settings - Fork 152
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use torch.jit.trace
in unit-test
#205
Conversation
|
Codecov Report
@@ Coverage Diff @@
## main #205 +/- ##
=======================================
Coverage 96.98% 96.98%
=======================================
Files 10 10
Lines 630 630
=======================================
Hits 611 611
Misses 19 19
Flags with carried forward coverage won't be shown. Click here to find out more. Continue to review full report at Codecov.
|
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.
Hi up @nihui , Thanks for your contributions here!
|
||
|
||
if __name__ == "__main__": | ||
|
||
model = yolov5s(pretrained=True) | ||
model.eval() | ||
traced_model = get_trace_module(model, input_shape=(416, 352)) |
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.
Hi @nihui , I previously wrapped the torch.jit.trace
in get_trace_module
as follows. I changed your code here directly to this calling method. Also, I made some changes to the C++ part of the code to accommodate torch.jit.trace
.
No description provided.