Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

[v1.5.x] Handle fix_gamma in tensorrt subgraph conversion correctly #15874

Merged
merged 1 commit into from
Aug 16, 2019

Conversation

KellenSunderland
Copy link
Contributor

Description

the current nnvm->onnx->tensorrt conversion is ignoring the fix_gamma field for batch norm layer. This commit tries to solve this particular issue by providing a way to massage params map before convert nnvm to onnx.

Checklist

Essentials

Please feel free to remove inapplicable items for your PR.

  • [ x ] Changes are complete (i.e. I finished coding on this PR)
  • [ x ] All changes have test coverage:
    • the unit test failed before and succeeded after
 a: array([[[[4.9751253]]]], dtype=float32)
 b: array([[[[0.]]]], dtype=float32)
-------------------- >> begin captured stdout << ---------------------
[[[[4.9751253]]]]
[[[[0.]]]]
--------------------- >> end captured stdout << ----------------------
----------------------------------------------------------------------
Ran 1 test in 5.820s
FAILED (failures=1)
.
----------------------------------------------------------------------
Ran 1 test in 5.513s
OK
  • [ x ] Code is well-documented:
  • [ x ] To the my best knowledge, examples are either not affected by this change, or have been fixed to be compatible with this change

Changes

  • [ x ] Add "Preprocess" step in nnvm->onnx conversion where allow modifying param map

Comments

This is a bug fix for tensor rt subgraph conversion

@KellenSunderland KellenSunderland changed the title [v1.5.x] Fix gamma 1 5 [v1.5.x] Handle fix_gamma in tensorrt subgraph conversion correctly Aug 13, 2019
Copy link
Contributor

@pengzhao-intel pengzhao-intel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@TaoLv
Copy link
Member

TaoLv commented Aug 16, 2019

Thank you @KellenSunderland. Merging now.

@TaoLv TaoLv merged commit 6a36152 into apache:v1.5.x Aug 16, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants