Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -723,7 +723,14 @@ bool BatchNormalizationNodeGroupSelector::Check(const GraphViewer& graph_viewer,
const Node* redundant_clip_node,
const std::vector<const Node*>& dq_nodes,
const std::vector<const Node*>& q_nodes) const {
if (!CheckQDQNodes(graph_viewer, node, redundant_clip_node, dq_nodes, q_nodes, 3)) {
// BatchNormalization has 5 inputs: x, scale, bias, mean, var.
// Require DQ on x and scale (indices 0,1). mean, var may optionally have DQ.
const int num_dq_nodes = gsl::narrow_cast<int>(dq_nodes.size());
if (num_dq_nodes < 3 || num_dq_nodes > 5) {
return false;
}

if (!CheckQDQNodes(graph_viewer, node, redundant_clip_node, dq_nodes, q_nodes, num_dq_nodes)) {
return false;
}

Expand Down
Loading