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

[ MO Interpolate ] Fixing broken model reshape-ability #619

Merged

Conversation

jane-intel
Copy link
Contributor

@jane-intel jane-intel commented May 26, 2020

Description: Interpolate operation with hard-coded (constant) target_spatial_shape input usually prevents user from successful spatial reshape of the model. It is totally valid, but customer may not be able to change the original model, so we introduce two transformations for making Interpolate operation reshape-able:

  1. InterpolateConcat -- is valid for all user scenarios and is enabled in MO by default
  2. InterpolateReshapeWA -- is not valid in all possible cases, but as we observed on practice -- this transformation helps in 99.99% cases.

Ticket: CVS-32096 -- there may be more

Code:

  • Comments
  • Code style (PEP8)
  • Transformation generates reshape-able IR
  • Transformation preserves node names: N/A -- we replace constants. preserving their names is sort of weird as we probably already lost its original name and in case of reshape this nodes output will be different

Validation:

  • Unit tests: Units are too small to test
  • Framework layer tests: N/A
  • Transformation tests: Done
  • e2e model test with an update of reshape_utils.py: N/A
  • MO IR Reader check: N/A

Documentation:

  • Supported frameworks operations list: N/A
  • Supported public models list: N/A
  • New operations specification N/A
  • Guide on how to convert the public model: N/A
  • User guide update: N/A

Other:

  • Sample/Demo application to infer the model: N/A

@jane-intel jane-intel added the category: MO Model Optimizer label May 26, 2020
@jane-intel jane-intel requested review from lazarevevgeny and a team May 26, 2020 20:25
@jane-intel jane-intel requested review from slyalin and removed request for a team May 26, 2020 20:26
@slyalin
Copy link
Contributor

slyalin commented May 27, 2020

Leaving code review for @lazarevevgeny, I approve the concept of "smart reshape". We should think whether we need to call transformations of this kind in run-time transformation pipeline in nGraph and where the best palace to do that (it should be done before network reshape). @jane-intel, please formulate your thoughts about it in that ticket.

@jane-intel jane-intel requested a review from rkazants May 28, 2020 09:24
Copy link
Member

@rkazants rkazants left a comment

Choose a reason for hiding this comment

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

review finished

@jane-intel jane-intel force-pushed the mo/jane/interpolate-WA branch from 69b5c12 to 6b794b2 Compare May 28, 2020 17:04
@jane-intel jane-intel force-pushed the mo/jane/interpolate-WA branch from 6b794b2 to 22d4d1b Compare May 28, 2020 17:07
@lazarevevgeny lazarevevgeny merged commit e290b14 into openvinotoolkit:master May 29, 2020
azhogov pushed a commit to azhogov/openvino that referenced this pull request Jun 1, 2020
@ilya-lavrenov ilya-lavrenov added this to the 2020.4 milestone Jun 4, 2020
@jane-intel jane-intel deleted the mo/jane/interpolate-WA branch July 3, 2020 17:04
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.

5 participants