-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Add python example of TensorRT INT8 inference on ResNet model #6255
Merged
Merged
Changes from 1 commit
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
18560f5
add trt int8 example on resnet model
stevenlix 1e8d9b6
Update e2e_tensorrt_resnet_example.py
stevenlix e5c212d
remove keras dependency and update class names
stevenlix 2ec3b65
Merge branch 'stevenlix/resnet' of https://github.com/microsoft/onnxr…
stevenlix c938225
move ImageNetDataReader and ImageClassificationEvaluator to tensorrt …
stevenlix 353e6f1
simplify e2e_tensorrt_resnet_example.py
stevenlix 17000c8
Update preprocessing.py
stevenlix 62e9979
merge tensorrt_calibrate
stevenlix 62cabaf
Merge branch 'stevenlix/resnet' of https://github.com/microsoft/onnxr…
stevenlix 4367531
Update calibrate.py
stevenlix 1bff973
Update calibrate.py
stevenlix d4141c2
generalize calibrate
stevenlix 13a3a78
Merge branch 'stevenlix/resnet' of https://github.com/microsoft/onnxr…
stevenlix 61905b8
Update calibrate.py
stevenlix d31b403
fix issues
stevenlix 766e75c
fix formating
stevenlix c24a39b
remove augment_all
stevenlix d795b59
merge master
stevenlix File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
generalize calibrate
- Loading branch information
commit d4141c25116f8bcb97334222938dfa27a6ee07df
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
@yufenglee , what's your take on this api? i think we are trying to provide flexibility to user to specify which nodes to quantize.
so far, the api supports by op type, by node name, now we want to give option by data type /all option.
op_types, black_nodes, white_nodes arguments all work and are consistent with each other.
But i'm not sure about augment_all.
meaning, in some sense if you see augment_all, op_types, black_nodes etc. all carry no meaning and should be ignored?
is there a better way to make it all consistent with each other?
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 if explicit empty list or None means augment all?
i.e. empty op_types, empty black_nodes, and empty white_nodes , or None for each.
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.
Everything empty means no augmentation. We could add all nodes to the white_nodes list for TRT, but it requires user to get graph's node list first before calibration.
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.
it doesn't have to mean no augmentation. the default could mean to augment everything, unless you explicitly specify which ops or node names to include/exclude.
we can define the semantics and document it clearly.
i'm not sure if it makes sense for empty to mean no augmentation. why would the user call the api if there is nothing to do.