21 bool keepDims =
false;
23 unsigned int inputShape[] = { 2, 3, 4 };
24 TensorInfo inputTensorInfo(3, &inputShape[0], DataType::Float32);
27 std::set<unsigned int> axisData1 = { 0, 1, 2 };
33 BOOST_ASSERT(outputTensorInfo1.
GetShape()[0] == 1);
36 std::set<unsigned int> axisData2 = { 0 };
42 BOOST_ASSERT(outputTensorInfo2.
GetShape()[0] == 12);
45 std::set<unsigned int> axisData3 = { 0, 1 };
51 BOOST_ASSERT(outputTensorInfo3.
GetShape()[0] == 4);
55 std::set<unsigned int> axisData4 = { 0 };
62 BOOST_ASSERT(outputTensorInfo4.
GetShape()[0] == 1);
63 BOOST_ASSERT(outputTensorInfo4.
GetShape()[1] == 3);
64 BOOST_ASSERT(outputTensorInfo4.
GetShape()[2] == 4);
68 std::set<unsigned int> axisData5 = { 1, 2 };
75 BOOST_ASSERT(outputTensorInfo5.
GetShape()[0] == 2);
76 BOOST_ASSERT(outputTensorInfo5.
GetShape()[1] == 1);
77 BOOST_ASSERT(outputTensorInfo5.
GetShape()[2] == 1);
unsigned int GetNumDimensions() const
void CalculateReducedOutputTensoInfo(const armnn::TensorInfo &inputTensorInfo, const std::set< unsigned int > &axisSet, bool keepDims, armnn::TensorInfo &outputTensorInfo)
Creates a tensor info after reducing the dimensions mentioned in axisData.
const TensorShape & GetShape() const