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

ReverseInputChannels mapping fix #5523

Conversation

popovaan
Copy link
Contributor

@popovaan popovaan commented May 6, 2021

Root cause analysis:
When --reverse_input_channels command is specified, MO generates incorrect mapping, where framework input name doesn't correspond to input name in IE. This happens because ReverseInputChannels inserts preprocessing transformations after Parameter nodes. As default behavior of MO is to save framework name to the end of subgraph, the resulting mapping contains record like:

<map>
	<framework name="cur_inputs" out_port_id="cur_inputs:0"/>
	<IR name="cur_inputs/reverse_input_channels23740/Concat" out_port_id="3" id="120"/>
</map>

Such record leads to error in DL Benchmark as framework name doesn't correspond to IE input name.

Solution:
Use "source" attributes save mode in set_source() in ReverseInputChannels, which takes attributes from the source node and makes framework name be saved at the beginning of subgraph. This mode should be used only for Parameter nodes, for other nodes framework name should correspond to the last node of subgraph.

Ticket: 54589

Code:

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

Validation:

  • Unit tests
  • Framework operation tests - N/A
  • Transformation tests - N/A
  • Model Optimizer IR Reader check

Documentation:

  • Supported frameworks operations list - N/A
  • Guide on how to convert the public model - N/A
  • User guide update - N/A

@popovaan popovaan requested a review from a team May 6, 2021 07:05
@popovaan popovaan marked this pull request as draft May 6, 2021 07:09
@openvino-pushbot openvino-pushbot added the category: MO Model Optimizer label May 6, 2021
@popovaan popovaan marked this pull request as ready for review May 7, 2021 09:41
@popovaan popovaan requested review from a team, mvafin, yekruglov and evolosen and removed request for a team May 7, 2021 09:42
@lazarevevgeny lazarevevgeny enabled auto-merge (squash) May 7, 2021 11:32
@lazarevevgeny lazarevevgeny merged commit 4ea09b1 into openvinotoolkit:master May 7, 2021
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.

6 participants