[LPT] Disable Move Fake Quantize on shuffle channels pattern (#10389)

* added shuffle channels check

* refactoring
This commit is contained in:
Nikita Demashov
2022-02-21 10:01:37 +03:00
committed by GitHub
parent e89c7ed8e5
commit f7a85c59fe

View File

@@ -176,6 +176,18 @@ bool MoveFakeQuantize::canBeTransformed(const TransformationContext& context, st
if (q_dq && (convert_q->get_output_size() != 1 || layer->get_output_size() != 1)) {
return false;
}
bool only_split = true;
const size_t id = concat->get_input_node_ptr(0)->get_instance_id();
for (size_t i = 1; i < concat->get_input_size(); ++i) {
if (!is_type<opset1::Split>(concat->get_input_node_ptr(i)) ||
concat->get_input_node_ptr(i)->get_instance_id() != id) {
only_split = false;
break;
}
}
if (only_split) {
return false;
}
return true;
}