41 bool axis_is_1_and_2 =
42 _keep_dims && inputShape.DimensionsCount() == 4 && axisVec.size() == 2 &&
43 ((axisVec[0] == 1 && axisVec[1] == 2) || (axisVec[0] == 2 && axisVec[1] == 1));
53 getBuffer<float>(
_output), axisVec);
74 throw std::runtime_error{
"Mean: unsupported data type"};
89 throw std::runtime_error{
"Mean: unsupported data type"};
A tensor class that is portable for other backends.
float data_scale() const override final
int32_t data_zero_point() const override final
ir::DataType data_type() const override final
void configure(const IPortableTensor *input, const IPortableTensor *axes, IPortableTensor *output, bool keep_dims)
IPortableTensor * _output
const IPortableTensor * _input
const IPortableTensor * _axes
void MeanQ8Asymm(const Shape &input_shape, const In *input_data, float input_scale, int32_t input_offset, const Shape &output_shape, Out *output_data, float output_scale, int32_t output_offset, const std::vector< int > &axes)
void MeanAxis1And2(const Shape &input_shape, const In *input_data, const Shape &output_shape, Out *output_data)
void Mean(const Shape &input_shape, const In *input_data, const Shape &output_shape, Out *output_data, const std::vector< int > &axes)
nnfw::cker::Shape getShape(const IPortableTensor *tensor)
std::vector< int32_t > getReducerAxes(const IPortableTensor *axes)