Commit 3eb99596 authored by Jayaram Bobba's avatar Jayaram Bobba Committed by Sang Ik Lee

Bug fix in conv v1 shape inference (#3912)

parent 1c2cd853
......@@ -102,15 +102,14 @@ void op::v1::Convolution::validate_and_infer_types()
filters_et,
").");
result_shape =
infer_convolution_forward(this,
data_batch_shape,
Strides(static_cast<size_t>(data_batch_shape.rank()) - 2, 1),
m_pads_begin,
m_pads_end,
filters_shape,
m_strides,
m_dilations);
result_shape = infer_convolution_forward(this,
data_batch_shape,
Strides(m_strides.size(), 1), // dummy data dilations
m_pads_begin,
m_pads_end,
filters_shape,
m_strides,
m_dilations);
set_output_type(0, result_et, result_shape);
}
......
......@@ -2840,3 +2840,25 @@ TEST(type_prop, conv_bprop_data_v1_output_partial_shape_dynamic)
ASSERT_TRUE(conv1->get_output_partial_shape(0).is_dynamic());
}
TEST(type_prop, conv_v1_partial_rank)
{
PartialShape data_batch_shape{PartialShape::dynamic()};
PartialShape filters_shape{PartialShape::dynamic()};
Strides window_movement_strides{1, 1};
Strides window_dilation_strides{1, 1};
CoordinateDiff padding_below{0, 0};
CoordinateDiff padding_above{0, 0};
auto param0 = make_shared<op::Parameter>(element::f32, data_batch_shape);
auto param1 = make_shared<op::Parameter>(element::f32, filters_shape);
auto conv = make_shared<op::v1::Convolution>(param0,
param1,
window_movement_strides,
padding_below,
padding_above,
window_dilation_strides);
ASSERT_TRUE(conv->get_output_partial_shape(0).is_dynamic());
}
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