forked from NVIDIA/TensorRT
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
serialize CPU data of PriorBox to engine only
PriorBox plugin serialize CPU metadata (array size) A and GPU data (array elements) B' in engine. B' is modified from CPU array B when constructing the object. A deserialized object then holds data A and B' which is different from the original (A and B). If a new object is created from a deserialized one via `PriorBox::clone()`, which rebuilds array elements at GPU side from CPU holding array A and B', the generated GPU data is incorrect (A and B''), resulting in wrong inference result. As PriorBox is designed to track data in specific format, we now serialize only the CPU data A and B, i.e. the parameters that used to construct a PriorBox object, to engine. bad image processing with deserialized engine 1. Fixed the memory deallocation error in plugin PriorBox::clone() method even without serialization by initializing empty pointer to nullptr. 2. Initialized weights to empty structs 3. Added mParam.aspectRatios to serialization and deserialization since mParam.aspectRatios are different from aspectRatios device weights in count and values. Signed-off-by: Rajeev Rao <[email protected]>
- Loading branch information
1 parent
932bcd6
commit 80e2473
Showing
2 changed files
with
99 additions
and
92 deletions.
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