Skip to content
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

Fix for Reduce extractors and normalizer #3136

Conversation

lazarevevgeny
Copy link
Contributor

@lazarevevgeny lazarevevgeny commented Nov 15, 2020

Description: Fixed extractor for Reduce operations from ONNX. If the axis value in the Reduce op is not specified then the extractor creates a numpy array the following way: int64_array(None). This value is not None because it is a numpy array. So the ReduceAxisNormalizer creates a Const with int64_array(None) value. This causes an issue in the transformations where the value of Const is compared with some other floating point values because numpy tries to compare None value and some floating point value.

JIRA: 43166

Code:

  • Comments
  • Code style (PEP8)
  • Transformation generates reshape-able IR
  • Transformation preserves original framework node names

Validation:

  • Unit tests
  • Framework operation tests: no new op enabled
  • Transformation tests
  • e2e model test with an update of ./tests/e2e_oss/utils/reshape_utils.py: N/A no new model enabled
  • Model Optimizer IR Reader check: N/A since the change does not affect MO IR Reader

Documentation:

  • Supported frameworks operations list: N/A no new op enabled
  • Supported public models list: N/A no new model enabled
  • New operations specification: N/A no new op enabled
  • Guide on how to convert the public model: N/A no new model enabled
  • User guide update: N/A no new user-visible change

@lazarevevgeny lazarevevgeny requested review from a team, mvafin and achetver November 15, 2020 13:04
@lazarevevgeny lazarevevgeny added the category: MO Model Optimizer label Nov 15, 2020
@lazarevevgeny lazarevevgeny added this to the 2021.2 milestone Nov 15, 2020
@lazarevevgeny lazarevevgeny merged commit 0a9d883 into openvinotoolkit:master Nov 16, 2020
@lazarevevgeny lazarevevgeny deleted the reduce_extractors_and_normalizer branch November 16, 2020 15:50
mryzhov pushed a commit to mryzhov/openvino that referenced this pull request Nov 17, 2020
* Fixed extractor for ONNX ReduceXXX operations and fixed ReduceAxisNormalizer transformation

* Unit test for ReduceAxisNormalizer transformation
mryzhov pushed a commit to mryzhov/openvino that referenced this pull request Dec 16, 2020
* Fixed extractor for ONNX ReduceXXX operations and fixed ReduceAxisNormalizer transformation

* Unit test for ReduceAxisNormalizer transformation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: MO Model Optimizer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants