Commit b4d6dfd4 authored by nishant.b.patel's avatar nishant.b.patel

Change QuantizedConvolutionBuilder api to take axes

parent 34806616
...@@ -39,7 +39,8 @@ namespace ngraph ...@@ -39,7 +39,8 @@ namespace ngraph
const shared_ptr<Node>& max_filter, const shared_ptr<Node>& max_filter,
const shared_ptr<Node>& min_output, const shared_ptr<Node>& min_output,
const shared_ptr<Node>& max_output, const shared_ptr<Node>& max_output,
const ngraph::element::Type& output_type) const ngraph::element::Type& output_type,
const ngraph::AxisSet& axes)
{ {
auto input_scale = auto input_scale =
quantization_scale::get_scale(min_input, max_input, input->get_element_type()); quantization_scale::get_scale(min_input, max_input, input->get_element_type());
...@@ -53,8 +54,6 @@ namespace ngraph ...@@ -53,8 +54,6 @@ namespace ngraph
auto filter_zero_point = auto filter_zero_point =
op::Constant::create(filters->get_element_type(), Shape{}, {0}); op::Constant::create(filters->get_element_type(), Shape{}, {0});
AxisSet quantization_axes;
return make_shared<op::QuantizedConvolution>( return make_shared<op::QuantizedConvolution>(
input, input,
filters, filters,
...@@ -70,7 +69,7 @@ namespace ngraph ...@@ -70,7 +69,7 @@ namespace ngraph
output_scale, output_scale,
filter_zero_point, // output type will be same as filter filter_zero_point, // output type will be same as filter
output_type, output_type,
quantization_axes); axes);
} }
} }
} }
...@@ -38,6 +38,7 @@ namespace ngraph ...@@ -38,6 +38,7 @@ namespace ngraph
const std::shared_ptr<Node>& max_filter, const std::shared_ptr<Node>& max_filter,
const std::shared_ptr<Node>& min_output, const std::shared_ptr<Node>& min_output,
const std::shared_ptr<Node>& max_output, const std::shared_ptr<Node>& max_output,
const ngraph::element::Type& output_type); const ngraph::element::Type& output_type,
const ngraph::AxisSet& axes);
} }
} }
...@@ -174,7 +174,8 @@ TEST(builder, scaled_QC) ...@@ -174,7 +174,8 @@ TEST(builder, scaled_QC)
F, F,
G, G,
H, H,
element::i8); element::i8,
AxisSet{});
auto f = make_shared<Function>(NodeVector{CV}, ParameterVector{A, B}); auto f = make_shared<Function>(NodeVector{CV}, ParameterVector{A, B});
constant_fold(f); constant_fold(f);
...@@ -254,7 +255,8 @@ TEST(builder, dynamic_scaled_QC) ...@@ -254,7 +255,8 @@ TEST(builder, dynamic_scaled_QC)
F, F,
G, G,
H, H,
element::i8); element::i8,
AxisSet{});
auto f = make_shared<Function>(NodeVector{CV}, ParameterVector{A, B, C, D, E, F, G, H}); auto f = make_shared<Function>(NodeVector{CV}, ParameterVector{A, B, C, D, E, F, G, H});
auto backend = runtime::Backend::create("CPU"); auto backend = runtime::Backend::create("CPU");
// Create some tensors for input/output // Create some tensors for input/output
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment