23.08
|
Functions | |
TensorShape | calculate_reduce_mean_shape (ITensorInfo *input, const Coordinates &reduction_axis, bool keep_dims) |
Calculate the output tensor shape for the reduce mean operation. More... | |
TensorShape | compute_vector_to_tensor_output_shape (const TensorShape &input, size_t conv_w, size_t conv_h, const DataLayout &data_layout) |
Calculate the output tensor shape of a vector input given the convolution dimensions. More... | |
TensorShape | compute_permutation_output_shape (const ITensorInfo &input, const PermutationVector &perm) |
Calculate the permuted shape of an input given a permutation vector. More... | |
TensorShape | compute_reorg_output_shape (const ITensorInfo &input, int32_t stride) |
Calculate the output shape of the reorg layer given a stride. More... | |
TensorShape | compute_weights_reshaped_shape (const ITensorInfo &weights, bool has_bias=false, unsigned int num_groups=1) |
Calculate the reshaped shape of the weights. More... | |
TensorShape | compute_lhs_reshaped_shape (const ITensorInfo &a, const GEMMLHSMatrixInfo &lhs_info, bool reinterpret_input_as_3d=false) |
Calculate the Left Hand Side matrix reshaped shape. More... | |
TensorShape | compute_rhs_reshaped_shape (const ITensorInfo &a, const GEMMRHSMatrixInfo &rhs_info) |
Calculate the Right Hand Side matrix reshaped shape. More... | |
TensorShape | compute_interleaved_shape (const ITensorInfo &a, int mult_interleave4x4_height=1, bool reinterpret_input_as_3d=false) |
Calculate the interleaved shape of an input tensor. More... | |
TensorShape | compute_transpose1xW_shape (const ITensorInfo &b) |
Calculate the transposed 1xW shape. More... | |
TensorShape | compute_transpose1xW_with_element_size_shape (const ITensorInfo &b, int mult_transpose1xW_width=1) |
Calculate the transposed 1xW width element shape. More... | |
TensorShape | compute_reductionA_shape (const ITensorInfo &b) |
Calculate the reductionA shape used in GEMMLowp. More... | |
TensorShape | compute_reductionB_shape (const ITensorInfo &a) |
Calculate the reductionB shape used in GEMMLowp. More... | |
TensorShape | compute_col2im_shape (const ITensorInfo &input, const Size2D &convolved_dims, bool batch_size_on_z, unsigned int num_groups=1) |
Calculate the Col2Im shape. More... | |
TensorShape | compute_transposed_shape (const ITensorInfo &input) |
Calculate the transposed shape of a tensor. More... | |
TensorShape | compute_depthwise_convolution_shape (const ITensorInfo &input, const ITensorInfo &weights, const ConvolutionInfo &info) |
Calculate the depthwise convolution output shape of a tensor. More... | |
TensorShape | compute_deconvolution_upsampled_shape (const ITensorInfo &input, const ITensorInfo &weights, unsigned int sx, unsigned int sy, std::pair< unsigned int, unsigned int > &out_dims, uint32_t &padx, uint32_t &pady) |
Calculate the upsampled output shape used for deconvolution. More... | |
TensorShape | compute_deconvolution_output_shape (const std::pair< unsigned int, unsigned int > &out_dims, const ITensorInfo &input, const ITensorInfo &weights) |
Calculate the output shape of the deconvolution layer. More... | |
TensorShape | compute_im2col_conv_shape (const ITensorInfo *input, const Size2D &kernel_dims, const PadStrideInfo &conv_info, bool has_bias, const Size2D &dilation, bool batch_size_on_z, unsigned int num_groups=1, unsigned int input_pad_right=0) |
Calculate the im2col output shape of a tensor. More... | |
TensorShape | compute_flatten_shape (const ITensorInfo *input) |
Calculate the flattened output shape of a tensor. More... | |
TensorShape | compute_softmax_shape (const ITensorInfo *input, size_t axis=1) |
Calculate the softmax output shape of a tensor. More... | |
TensorShape | compute_winograd_filter_transform_shape (const ITensorInfo &input, const WinogradInfo &winograd_info) |
Calculate the winograd filter transform shape. More... | |
TensorShape | compute_winograd_input_transform_shape (const ITensorInfo &input, const WinogradInfo &winograd_info) |
Calculate the winograd input transform shape. More... | |
TensorShape | compute_winograd_output_transform_shape (const ITensorInfo &input, const WinogradInfo &winograd_info) |
Calculate the winograd output transform shape. More... | |
TensorShape | compute_deep_convolution_shape (const TensorShape &input_shape, DataLayout input_data_layout, const TensorShape &weights_shape, const PadStrideInfo &conv_info) |
Calculate the deep convolution shape output shape of a tensor. More... | |
TensorShape | compute_deep_convolution_shape (const ITensorInfo &input, const ITensorInfo &weights, const PadStrideInfo &conv_info) |
Calculate the deep convolution shape output shape of a tensor. More... | |
TensorShape | compute_indirect_buffer_shape (const TensorShape &input_shape, DataLayout input_data_layout, const TensorShape &weights_shape, const PadStrideInfo &conv_info, const DirectConvComputeKernelInfo &desc) |
Calculate the indirect buffer output shape used by the indirect convolution function. More... | |
TensorShape | compute_min_max_shape (const ITensorInfo *input) |
Calculate the min/max shape output shape of a tensor. More... | |
TensorShape | compute_pool_shape (const ITensorInfo &input, PoolingLayerInfo pool_info) |
Calculate the output pool shape of a tensor. More... | |
TensorShape | compute_unpool_shape (const ITensorInfo &input, PoolingLayerInfo pool_info) |
Calculate the output unpool shape of a tensor. More... | |
TensorShape | compute_roi_align_shape (const ITensorInfo &input, const ITensorInfo &rois, ROIPoolingLayerInfo pool_info) |
Calculate the output roi align shape of a tensor. More... | |
TensorShape | compute_rnn_shape (const ITensorInfo *input, const unsigned int batch_size) |
Calculate the RNN shape of a tensor. More... | |
TensorShape | compute_mm_shape (const ITensorInfo &input0, const ITensorInfo &input1, bool is_interleaved_transposed, const GEMMReshapeInfo &reshape_info) |
Calculate the matrix multiplication output shape of two tensors. More... | |
TensorShape | compute_mm_shape (const ITensorInfo &input0, const ITensorInfo &input1, const GEMMReshapeInfo &gemm_info) |
Calculate the matrix multiplication output shape of two tensors. More... | |
TensorShape | compute_mm_shape (const ITensorInfo &input0, const ITensorInfo &input1, const GEMMKernelInfo &gemm_info) |
Calculate the matrix multiplication output shape of two tensors. More... | |
TensorShape | compute_matmul_shape (const TensorShape &input0, const TensorShape &input1, const MatMulKernelInfo &matmul_info) |
Calculate the matrix multiplication output shape of two tensors. More... | |
TensorShape | compute_output_stage_shape (const ITensorInfo &input, unsigned int gemm_3d_depth=1, bool batch_size_on_z=false) |
Calculate the matrix multiplication output shape of two tensors. More... | |
TensorShape | compute_strided_slice_shape (const ITensorInfo &input, const Coordinates &starts, const Coordinates &ends, const Coordinates &strides, int32_t begin_mask, int32_t end_mask, int32_t shrink_axis_mask) |
Calculate the strided slice output shape of a tensor. More... | |
TensorShape | compute_slice_shape (const TensorShape &input_shape, const Coordinates &starts, const Coordinates &ends) |
Calculate the slice output shape of a tensor. More... | |
TensorShape | compute_batch_to_space_shape (DataLayout data_layout, const TensorShape &input, int block_x, int block_y, const CropInfo &crop_info=CropInfo{}) |
Calculate the batch to space output shape of a tensor. More... | |
TensorShape | compute_depth_to_space_shape (const TensorShape &input_shape, DataLayout data_layout, int block) |
Calculate the depth to space output shape of a tensor. More... | |
TensorShape | compute_split_shape (const ITensorInfo *input, unsigned int axis, unsigned int num_splits) |
Calculate the split output shape of a tensor. More... | |
TensorShape | compute_space_to_batch_shape (const ITensorInfo *input, int block_x, int block_y, const Size2D &padding_left, const Size2D &padding_right) |
Calculate the space to batch output shape of a tensor. More... | |
TensorShape | compute_space_to_depth_shape (const ITensorInfo *input, int32_t block_shape) |
Calculate the space to batch output shape of a tensor. More... | |
TensorShape | compute_prior_box_shape (const ITensorInfo &input, const PriorBoxLayerInfo &info) |
Calculate the prior box output shape of a tensor. More... | |
TensorShape | compute_padded_shape (const TensorShape &input_shape, const PaddingList &padding) |
Calculate the padded shape of a tensor. More... | |
TensorShape | compute_tiled_shape (const TensorShape &input_shape, const Multiples &multiples) |
Calculate the tiled shape of a tensor. More... | |
TensorShape | compute_reduced_shape (const TensorShape &input, unsigned int axis, bool keep_dims=true) |
Calculate the reduced shape of a tensor given an axis. More... | |
TensorShape | compute_upsample_shape (const ITensorInfo &input, const Size2D &info) |
Calculate the upsampled shape of a tensor. More... | |
template<typename T > | |
TensorShape | extract_shape (T *data) |
Get the tensor shape. More... | |
TensorShape | extract_shape (ITensorInfo *data) |
TensorShape | extract_shape (const ITensorInfo *data) |
TensorShape | extract_shape (const TensorShape *data) |
TensorShape | extract_shape (TensorShape *data) |
TensorShape | calculate_unstack_shape (TensorShape input_shape, unsigned int axis) |
Calculate the unstack shape of a tensor. More... | |
template<typename T > | |
TensorShape | calculate_concatenate_shape (const std::vector< T * > &input, size_t axis) |
Calculate the concatenate output shape of the concatenate operation along a single axis. More... | |
TensorShape | compute_stack_shape (const ITensorInfo &a, unsigned int axis, unsigned int num_tensors) |
Calculate the stack output shape of a tensor. More... | |
TensorShape | compute_conv3d_shape (const TensorShape &src, const TensorShape &weights, const Conv3dInfo &conv3d_info) |
Calculate the output shape of 3d Convolution. More... | |
TensorShape | compute_pool3d_shape (const TensorShape &src, Pooling3dLayerInfo pool3d_info) |
Calculate the output pool3d shape of a tensor. More... | |
TensorShape | compute_gather_shape (const TensorShape &input_shape, const TensorShape &indices_shape, uint32_t actual_axis) |
Calculate the gather output shape of a tensor. More... | |
|
inline |
Calculate the concatenate output shape of the concatenate operation along a single axis.
[in] | input | Vector containing the shapes of the inputs |
[in] | axis | Axis along which to concatenate the input tensors |
Definition at line 1404 of file ShapeCalculator.h.
References ARM_COMPUTE_ERROR_ON, extract_shape(), arm_compute::test::validation::input, arm_compute::MAX_DIMS, TensorShape::set(), arm_compute::test::validation::shape, and tensor.
Referenced by ConcatenateLayerNode::compute_output_descriptor(), CpuConcatenate::configure(), ClConcatenate::configure(), CLLSTMLayer::configure(), CpuConcatenate::validate(), ClConcatenate::validate(), NELSTMLayer::validate(), and CLLSTMLayer::validate().
|
inline |
Calculate the output tensor shape for the reduce mean operation.
[in] | input | Input tensor shape |
[in] | reduction_axis | Reduction axis |
[in] | keep_dims | Flag to indicate if dimensions are kept |
Definition at line 52 of file ShapeCalculator.h.
References Dimensions< T >::begin(), arm_compute::convert_negative_axis(), arm_compute::test::validation::input, Dimensions< T >::num_dimensions(), TensorShape::remove_dimension(), and TensorShape::set().
Referenced by NEReduceMean::configure(), and CLReduceMean::configure().
|
inline |
Calculate the unstack shape of a tensor.
[in] | input_shape | Input tensor shape |
[in] | axis | Axis on which to perform the unstack operation |
Definition at line 1389 of file ShapeCalculator.h.
References ARM_COMPUTE_ERROR_ON, and arm_compute::test::validation::input_shape.
|
inline |
Calculate the batch to space output shape of a tensor.
[in] | data_layout | Data layout |
[in] | input | Input tensor shape |
[in] | block_x | Block shape x value |
[in] | block_y | Block shape y value |
[in] | crop_info | Information about how the output shape is cropped after batch to space is performed |
Definition at line 1113 of file ShapeCalculator.h.
Referenced by arm_compute::test::validation::reference::batch_to_space(), NEBatchToSpaceLayerKernel::configure(), and CLBatchToSpaceLayerKernel::configure().
|
inline |
Calculate the Col2Im shape.
[in] | input | Input tensor info |
[in] | convolved_dims | Convolved dimensions |
[in] | batch_size_on_z | True if batch size is on z axis |
[in] | num_groups | (Optional) Number of groups when performing a grouped convolution |
Definition at line 373 of file ShapeCalculator.h.
References Size2D::area(), ARM_COMPUTE_ERROR_ON, arm_compute::CHANNEL, arm_compute::test::validation::data_layout, arm_compute::get_data_layout_dimension_index(), Size2D::height, arm_compute::HEIGHT, arm_compute::test::validation::input, arm_compute::test::validation::num_groups, Size2D::width, and arm_compute::WIDTH.
Referenced by CpuCol2ImKernel::configure().
|
inline |
Calculate the output shape of 3d Convolution.
[in] | src | Input tensor shape |
[in] | weights | Weights tensor shape |
[in] | conv3d_info | 3d Convolution Parameters object |
Definition at line 1476 of file ShapeCalculator.h.
References ARM_COMPUTE_ERROR, Padding3D::back, batch_dim, Padding3D::bottom, arm_compute::CEIL, channel_dim, Size3D::depth, depth_dim, Conv3dInfo::dilation, arm_compute::FLOOR, Padding3D::front, Size3D::height, height_dim, Padding3D::left, arm_compute::test::validation::output_shape, Conv3dInfo::padding, Padding3D::right, Conv3dInfo::round_type, arm_compute::test::validation::src, Conv3dInfo::stride, Padding3D::top, weights_CHout_dim, weights_depth_dim, weights_height_dim, weights_width_dim, Size3D::width, width_dim, Size3D::x(), Size3D::y(), and Size3D::z().
Referenced by CpuDirectConv3dKernel::configure(), and arm_compute::test::validation::reference::conv3d().
|
inline |
Calculate the output shape of the deconvolution layer.
[in] | out_dims | Output x and y shape dimensions |
[in] | input | Input tensor info |
[in] | weights | Weights tensor shape |
Definition at line 494 of file ShapeCalculator.h.
References arm_compute::BATCHES, arm_compute::CHANNEL, arm_compute::test::validation::data_layout, arm_compute::get_data_layout_dimension_index(), arm_compute::HEIGHT, arm_compute::test::validation::input, arm_compute::test::validation::input_shape, ITensorInfo::tensor_shape(), arm_compute::test::validation::weights_shape, and arm_compute::WIDTH.
Referenced by ClTransposedConvolutionKernel::configure(), NEDeconvolutionLayer::configure(), CLDirectDeconvolutionLayer::configure(), NEDeconvolutionLayer::validate(), CLGEMMDeconvolutionLayer::validate(), and CLDirectDeconvolutionLayer::validate().
|
inline |
Calculate the upsampled output shape used for deconvolution.
[in] | input | Input tensor info |
[in] | weights | Weights tensor shape |
[in] | sx | Stride on x axis |
[in] | sy | Stride on y axis |
[in] | out_dims | Output shape dimensions |
[in] | padx | Padding on x axis |
[in] | pady | Padding on y axis |
Definition at line 462 of file ShapeCalculator.h.
References arm_compute::test::validation::data_layout, ITensorInfo::dimension(), arm_compute::get_data_layout_dimension_index(), arm_compute::HEIGHT, arm_compute::test::validation::input, TensorShape::set(), and arm_compute::WIDTH.
Referenced by NEDeconvolutionLayer::configure(), CLDirectDeconvolutionLayer::configure(), NEDeconvolutionLayer::validate(), and CLDirectDeconvolutionLayer::validate().
|
inline |
Calculate the deep convolution shape output shape of a tensor.
[in] | input | Input tensor info |
[in] | weights | Weights tensor info |
[in] | conv_info | Contains padding and stride information |
Definition at line 746 of file ShapeCalculator.h.
References compute_deep_convolution_shape(), arm_compute::test::validation::conv_info, arm_compute::test::validation::input, and ITensorInfo::tensor_shape().
|
inline |
Calculate the deep convolution shape output shape of a tensor.
[in] | input_shape | Input tensor shape |
[in] | input_data_layout | Input data layout |
[in] | weights_shape | Weights tensor shape |
[in] | conv_info | Contains padding and stride information |
Definition at line 715 of file ShapeCalculator.h.
References arm_compute::CHANNEL, arm_compute::test::validation::conv_info, arm_compute::get_data_layout_dimension_index(), arm_compute::HEIGHT, arm_compute::test::validation::idx_height, arm_compute::test::validation::idx_width, input_height, arm_compute::test::validation::input_shape, input_width, arm_compute::test::validation::output_shape, arm_compute::scaled_dimensions(), weights_height, arm_compute::test::validation::weights_shape, weights_width, and arm_compute::WIDTH.
Referenced by compute_deep_convolution_shape(), compute_indirect_buffer_shape(), CpuDirectConv2dKernel::configure(), ClIndirectConv2dKernel::configure(), ClIndirectConv2dAddressPrecalculationKernel::configure(), ClDirectConv2dKernel::configure(), ClConv2d::get_convolution_method(), arm_compute::test::validation::TEST_CASE(), ClComponentDirectConv2d::validate(), and arm_compute::cpu::kernels::validate_arguments().
|
inline |
Calculate the depth to space output shape of a tensor.
[in] | input_shape | Input tensor shape |
[in] | data_layout | Operation data layout |
[in] | block | Block shape value |
Definition at line 1147 of file ShapeCalculator.h.
References ARM_COMPUTE_ERROR_ON, arm_compute::CHANNEL, arm_compute::test::validation::data_layout, arm_compute::get_data_layout_dimension_index(), arm_compute::HEIGHT, arm_compute::test::validation::idx_height, arm_compute::test::validation::idx_width, arm_compute::test::validation::input_shape, arm_compute::test::validation::output_shape, and arm_compute::WIDTH.
Referenced by DepthToSpaceLayerNode::compute_output_descriptor(), NEDepthToSpaceLayerKernel::configure(), and CLDepthToSpaceLayerKernel::configure().
|
inline |
Calculate the depthwise convolution output shape of a tensor.
[in] | input | Input tensor info |
[in] | weights | Weights tensor info |
[in] | info | Convolution info |
Definition at line 422 of file ShapeCalculator.h.
References arm_compute::CHANNEL, ITensorInfo::data_layout(), arm_compute::test::validation::data_layout, arm_compute::get_data_layout_dimension_index(), arm_compute::HEIGHT, arm_compute::test::validation::info, arm_compute::test::validation::input, arm_compute::test::validation::input_shape, arm_compute::test::validation::output_shape, arm_compute::scaled_dimensions(), ITensorInfo::tensor_shape(), arm_compute::test::validation::weights_shape, and arm_compute::WIDTH.
Referenced by CpuDepthwiseConv2dNativeKernel::configure(), CpuDepthwiseConv2dAssemblyWrapperKernel::configure(), CLDepthwiseConvolutionLayerNativeKernel::configure(), CpuDepthwiseConv2dAssemblyWrapperKernel::validate(), CLDepthwiseConvolutionLayer::validate(), and ClComponentDepthwiseConv2d::validate().
|
inline |
Calculate the flattened output shape of a tensor.
[in] | input | Input tensor info |
Definition at line 563 of file ShapeCalculator.h.
References arm_compute::test::validation::input, and arm_compute::test::validation::output_shape.
Referenced by NEFlattenLayer::configure(), CLFlattenLayer::configure(), NEFlattenLayer::validate(), CLFlattenLayer::validate(), CpuFullyConnected::validate(), and ClFullyConnected::validate().
|
inline |
Calculate the gather output shape of a tensor.
[in] | input_shape | Input tensor shape |
[in] | indices_shape | Indices tensor shape. Only supports for 2d and 3d indices |
[in] | actual_axis | Axis to be used in the computation |
Definition at line 1579 of file ShapeCalculator.h.
References ARM_COMPUTE_ERROR_ON, arm_compute::test::validation::input_shape, Dimensions< T >::num_dimensions(), Dimensions< int >::num_max_dimensions, arm_compute::test::validation::output_shape, and TensorShape::total_size().
Referenced by NEGatherKernel::configure(), and arm_compute::test::validation::reference::gather().
|
inline |
Calculate the im2col output shape of a tensor.
[in] | input | Input tensor info |
[in] | kernel_dims | The kernel dimensions (width and height). |
[in] | conv_info | Contains padding and stride information |
[in] | has_bias | In case biases are provided expands the matrix with 1 |
[in] | dilation | Dilation, in elements, across x and y |
[in] | batch_size_on_z | True if batch size is on z axis |
[in] | num_groups | (Optional) Number of groups when performing a grouped convolution |
[in] | input_pad_right | (Optional) When fast-math is selected, per element padding for the im2col matrix may be necessary |
Definition at line 525 of file ShapeCalculator.h.
References Size2D::area(), ARM_COMPUTE_ERROR_ON, arm_compute::CHANNEL, arm_compute::test::validation::conv_info, arm_compute::test::validation::data_layout, arm_compute::get_data_layout_dimension_index(), arm_compute::test::validation::has_bias, Size2D::height, arm_compute::HEIGHT, arm_compute::test::validation::input, arm_compute::NCHW, arm_compute::test::validation::num_groups, arm_compute::test::validation::output_shape, arm_compute::scaled_dimensions(), Size2D::width, and arm_compute::WIDTH.
Referenced by CpuIm2ColKernel::configure(), and ClGemmConv2d::validate().
|
inline |
Calculate the indirect buffer output shape used by the indirect convolution function.
[in] | input_shape | Input tensor shape |
[in] | input_data_layout | Input data layout |
[in] | weights_shape | Weights tensor shape |
[in] | conv_info | Contains padding and stride information |
[in] | desc | Contains the direct/indirect convolution compute arguments, such as the tiling dimensions |
Definition at line 761 of file ShapeCalculator.h.
References ARM_COMPUTE_ERROR_ON_MSG, compute_deep_convolution_shape(), arm_compute::test::validation::conv_info, arm_compute::DIV_CEIL(), arm_compute::test::validation::input_shape, DirectConvComputeKernelInfo::m0, arm_compute::NHWC, and arm_compute::test::validation::weights_shape.
Referenced by ClIndirectConv2dAddressPrecalculationKernel::configure(), and ClIndirectConv2d::validate().
|
inline |
Calculate the interleaved shape of an input tensor.
[in] | a | Input tensor info |
[in] | mult_interleave4x4_height | (Optional) Interleave4x4 height |
[in] | reinterpret_input_as_3d | (Optional) Set to true if the input need to be interpreted as 3d |
Definition at line 262 of file ShapeCalculator.h.
References ARM_COMPUTE_ERROR_ON, ITensorInfo::dimension(), M, TensorShape::set(), and ITensorInfo::tensor_shape().
Referenced by CpuGemmInterleave4x4Kernel::configure(), CpuGemmLowpMatrixMultiplyCore::configure(), CpuGemmInterleave4x4Kernel::validate(), and CpuGemm::validate().
|
inline |
Calculate the Left Hand Side matrix reshaped shape.
[in] | a | Input tensor info |
[in] | lhs_info | Left Hand Side matrix information |
[in] | reinterpret_input_as_3d | (Optional) Set to true if the input need to be interpreted as 3d |
Definition at line 182 of file ShapeCalculator.h.
References ARM_COMPUTE_ERROR_ON, ITensorInfo::dimension(), input_height, input_width, arm_compute::test::validation::lhs_info, TensorShape::remove_dimension(), TensorShape::set(), and ITensorInfo::tensor_shape().
|
inline |
Calculate the matrix multiplication output shape of two tensors.
[in] | input0 | First input tensor info |
[in] | input1 | Second input tensor info |
[in] | matmul_info | Batch MatMul Kernel info to know which matrix is transposed |
Definition at line 1019 of file ShapeCalculator.h.
References MatMulKernelInfo::adj_lhs, MatMulKernelInfo::adj_rhs, and arm_compute::test::validation::output_shape.
Referenced by ClMatMulNativeKernel::configure(), ClMatMulLowpNativeKernel::configure(), ClMatMulNativeMMULKernel::configure(), ClMatMulNativeKernel::validate(), ClMatMulLowpNativeKernel::validate(), and ClMatMulNativeMMULKernel::validate().
|
inline |
Calculate the min/max shape output shape of a tensor.
[in] | input | Input tensor info |
Definition at line 786 of file ShapeCalculator.h.
References Window::DimX, arm_compute::test::validation::input, and arm_compute::test::validation::output_shape.
|
inline |
Calculate the matrix multiplication output shape of two tensors.
[in] | input0 | First input tensor info |
[in] | input1 | Second input tensor info |
[in] | is_interleaved_transposed | True if the input is interleaved transposed |
[in] | reshape_info | GEMM reshape info |
Definition at line 907 of file ShapeCalculator.h.
References ARM_COMPUTE_ERROR_ON_MSG, GEMMReshapeInfo::depth_output_gemm3d(), ITensorInfo::dimension(), arm_compute::test::validation::m, GEMMReshapeInfo::m(), GEMMReshapeInfo::n(), ITensorInfo::num_dimensions(), arm_compute::test::validation::output_shape, GEMMReshapeInfo::reinterpret_input_as_3d(), and ITensorInfo::tensor_shape().
Referenced by ClGemmMatrixMultiplyNativeKernel::configure(), ClGemmMatrixMultiplyReshapedOnlyRhsMMULKernel::configure(), ClGemmMatrixMultiplyReshapedOnlyRhsKernel::configure(), ClGemmMatrixMultiplyReshapedKernel::configure(), ClGemmLowpMatrixMultiplyCore::validate(), and CpuGemm::validate().
|
inline |
Calculate the matrix multiplication output shape of two tensors.
[in] | input0 | First input tensor info |
[in] | input1 | Second input tensor info |
[in] | gemm_info | GEMM kernel info used to retrieve the original dimensions of the input matrices |
Definition at line 981 of file ShapeCalculator.h.
References ARM_COMPUTE_ERROR_ON_MSG, ARM_COMPUTE_UNUSED, arm_compute::test::validation::gemm_info, ITensorInfo::num_dimensions(), arm_compute::test::validation::output_shape, and ITensorInfo::tensor_shape().
|
inline |
Calculate the matrix multiplication output shape of two tensors.
[in] | input0 | First input tensor info |
[in] | input1 | Second input tensor info |
[in] | gemm_info | GEMM reshape info |
Definition at line 943 of file ShapeCalculator.h.
References ARM_COMPUTE_ERROR_ON_MSG, ARM_COMPUTE_UNUSED, arm_compute::test::validation::gemm_info, ITensorInfo::num_dimensions(), arm_compute::test::validation::output_shape, and ITensorInfo::tensor_shape().
|
inline |
Calculate the matrix multiplication output shape of two tensors.
[in] | input | Input tensor info |
[in] | gemm_3d_depth | (Optional) GEMM 3d depth |
[in] | batch_size_on_z | (Optional) True if batch size is on z axis |
Definition at line 1047 of file ShapeCalculator.h.
References ARM_COMPUTE_ERROR_ON, arm_compute::test::validation::input, arm_compute::NHWC, and arm_compute::test::validation::output_shape.
|
inline |
Calculate the padded shape of a tensor.
[in] | input_shape | Input tensor shape |
[in] | padding | Paddings list |
Definition at line 1276 of file ShapeCalculator.h.
References arm_compute::test::validation::input_shape, Dimensions< T >::num_dimensions(), and TensorShape::set().
Referenced by NEPadLayerKernel::configure(), CLPadLayerKernel::configure(), NEPadLayer::configure(), arm_compute::test::validation::reference::pad_layer(), and NEPadLayer::validate().
|
inline |
Calculate the permuted shape of an input given a permutation vector.
[in] | input | Input tensor info |
[in] | perm | Permutation vector |
Definition at line 110 of file ShapeCalculator.h.
References arm_compute::test::validation::input, arm_compute::test::validation::output_shape, and arm_compute::permute().
Referenced by CpuPermuteKernel::configure(), CPPPermuteKernel::configure(), ClSoftmax::validate(), and CpuSoftmaxGeneric< IS_LOG >::validate().
|
inline |
Calculate the output pool3d shape of a tensor.
[in] | src | Input tensor info |
[in] | pool3d_info | Pooling layer info |
Definition at line 1540 of file ShapeCalculator.h.
References ARM_COMPUTE_ERROR_ON_MSG, arm_compute::test::validation::data_layout, Size3D::depth, arm_compute::DEPTH, arm_compute::get_data_layout_dimension_index(), Size3D::height, arm_compute::HEIGHT, arm_compute::test::validation::idx_height, arm_compute::test::validation::idx_width, Pooling3dLayerInfo::is_global_pooling, arm_compute::NDHWC, arm_compute::test::validation::output_shape, Pooling3dLayerInfo::pool_size, arm_compute::scaled_3d_dimensions_signed(), arm_compute::test::validation::src, Size3D::width, and arm_compute::WIDTH.
Referenced by ClPool3dKernel::configure(), CpuPool3dKernel::configure(), and arm_compute::test::validation::reference::pooling_3d_layer_internal().
|
inline |
Calculate the output pool shape of a tensor.
[in] | input | Input tensor info |
[in] | pool_info | Pooling layer info |
Definition at line 803 of file ShapeCalculator.h.
References ARM_COMPUTE_ERROR_ON_MSG, arm_compute::get_data_layout_dimension_index(), Size2D::height, arm_compute::HEIGHT, arm_compute::test::validation::idx_height, arm_compute::test::validation::idx_width, arm_compute::test::validation::input, input_height, input_width, PoolingLayerInfo::is_global_pooling, arm_compute::test::validation::output_shape, PoolingLayerInfo::pad_stride_info, PoolingLayerInfo::pool_size, arm_compute::scaled_dimensions_signed(), Size2D::width, and arm_compute::WIDTH.
Referenced by ClPool2dKernel::configure(), CpuPool2dAssemblyWrapperKernel::configure(), GpuPool2d::create_op(), GpuPool2d::is_supported_op(), arm_compute::test::validation::reference::pooling_layer_internal(), ClComponentPool2d::validate(), and GpuPool2d::validate_op().
|
inline |
Calculate the prior box output shape of a tensor.
[in] | input | Input tensor info |
[in] | info | PriorBoxLayer info |
Definition at line 1255 of file ShapeCalculator.h.
References arm_compute::test::validation::data_layout, arm_compute::get_data_layout_dimension_index(), arm_compute::HEIGHT, arm_compute::test::validation::info, arm_compute::test::validation::input, arm_compute::test::validation::output_shape, and arm_compute::WIDTH.
|
inline |
Calculate the reduced shape of a tensor given an axis.
[in] | input | Input tensor info |
[in] | axis | Axis on which to perform reduction |
[in] | keep_dims | (Optional) Whether to keep the dimension after reduction operation. Defaults to true. |
Definition at line 1313 of file ShapeCalculator.h.
References arm_compute::test::validation::input, and arm_compute::test::validation::output_shape.
Referenced by NEReductionOperationKernel::configure(), CLReductionOperationKernel::configure(), NEReductionOperation::configure(), CLReductionOperation::configure(), CLArgMinMaxLayer::configure(), ReductionLayerNode::configure_output(), ArgMinMaxLayerNode::configure_output(), NEReductionOperation::validate(), CLArgMinMaxLayer::validate(), and CLReductionOperation::validate().
|
inline |
Calculate the reductionA shape used in GEMMLowp.
[in] | b | Input tensor info |
Definition at line 335 of file ShapeCalculator.h.
References arm_compute::test::validation::b.
Referenced by ClGemmLowpMatrixMultiplyCore::configure(), CpuGemmLowpMatrixMultiplyCore::configure(), ClGemmLowpMatrixMultiplyCore::validate(), and CpuGemmLowpMatrixMultiplyCore::validate().
|
inline |
Calculate the reductionB shape used in GEMMLowp.
[in] | a | Input tensor info |
Definition at line 352 of file ShapeCalculator.h.
References ITensorInfo::dimension(), Window::DimX, TensorShape::remove_dimension(), TensorShape::set(), and ITensorInfo::tensor_shape().
Referenced by ClGemmLowpMatrixMultiplyCore::configure(), CpuGemmLowpMatrixMultiplyCore::configure(), ClGemmLowpMatrixMultiplyCore::validate(), and CpuGemmLowpMatrixMultiplyCore::validate().
|
inline |
Calculate the output shape of the reorg layer given a stride.
[in] | input | Input tensor info |
[in] | stride | Stride |
Definition at line 124 of file ShapeCalculator.h.
References ARM_COMPUTE_ERROR_ON, ARM_COMPUTE_ERROR_ON_MSG, arm_compute::CHANNEL, arm_compute::get_data_layout_dimension_index(), arm_compute::HEIGHT, arm_compute::test::validation::idx_height, arm_compute::test::validation::idx_width, arm_compute::test::validation::input, arm_compute::test::validation::output_shape, and arm_compute::WIDTH.
Referenced by NEReorgLayerKernel::configure(), CLReorgLayerKernel::configure(), and arm_compute::test::validation::reference::reorg_layer().
|
inline |
Calculate the Right Hand Side matrix reshaped shape.
[in] | a | Input tensor info |
[in] | rhs_info | Right Hand Side matrix information |
Definition at line 226 of file ShapeCalculator.h.
References ARM_COMPUTE_ERROR_ON, ITensorInfo::dimension(), input_height, input_width, arm_compute::test::validation::rhs_info, TensorShape::set(), and ITensorInfo::tensor_shape().
Referenced by arm_compute::opencl::kernels::gemm::select_lhs_rhs_info(), and ClGemmLowpMatrixMultiplyCore::validate().
|
inline |
Calculate the RNN shape of a tensor.
[in] | input | Input tensor info |
[in] | batch_size | Batch size |
Definition at line 890 of file ShapeCalculator.h.
References arm_compute::test::validation::input, and arm_compute::test::validation::output_shape.
Referenced by NERNNLayer::configure(), CLRNNLayer::configure(), NERNNLayer::validate(), and CLRNNLayer::validate().
|
inline |
Calculate the output roi align shape of a tensor.
[in] | input | Input tensor info |
[in] | rois | Rois tensor info |
[in] | pool_info | Pooling layer info |
Definition at line 869 of file ShapeCalculator.h.
References ITensorInfo::dimension(), arm_compute::get_data_layout_dimension_index(), arm_compute::HEIGHT, arm_compute::test::validation::idx_height, arm_compute::test::validation::idx_width, arm_compute::test::validation::input, arm_compute::test::validation::output_shape, ROIPoolingLayerInfo::pooled_height(), ROIPoolingLayerInfo::pooled_width(), and arm_compute::WIDTH.
Referenced by NEROIAlignLayerKernel::configure(), and CLROIAlignLayerKernel::configure().
|
inline |
Calculate the slice output shape of a tensor.
[in] | input_shape | Input tensor info |
[in] | starts | The starts of the dimensions of the input tensor to be sliced |
[in] | ends | The ends of the dimensions of the input tensor to be sliced |
Definition at line 1094 of file ShapeCalculator.h.
References arm_compute::helpers::tensor_transform::compute_strided_slice_output_shape(), arm_compute::helpers::tensor_transform::construct_slice_end_mask(), and arm_compute::test::validation::input_shape.
Referenced by SliceLayerNode::compute_output_descriptor(), and arm_compute::test::validation::reference::slice().
|
inline |
Calculate the softmax output shape of a tensor.
[in] | input | Input tensor info |
[in] | axis | (Optional) Softmax axis |
Definition at line 581 of file ShapeCalculator.h.
References TensorShape::collapse(), Dimensions< T >::collapse_from(), arm_compute::test::validation::input, Dimensions< T >::num_dimensions(), and TensorShape::shift_right().
|
inline |
Calculate the space to batch output shape of a tensor.
[in] | input | Input tensor info |
[in] | block_x | Block shape x value |
[in] | block_y | Block shape y value |
[in] | padding_left | Left padding values |
[in] | padding_right | Right padding values |
Definition at line 1206 of file ShapeCalculator.h.
References ARM_COMPUTE_ERROR_ON, arm_compute::BATCHES, arm_compute::test::validation::data_layout, arm_compute::get_data_layout_dimension_index(), arm_compute::HEIGHT, arm_compute::test::validation::idx_height, arm_compute::test::validation::idx_width, arm_compute::test::validation::input, arm_compute::test::validation::output_shape, arm_compute::WIDTH, Size2D::x(), and Size2D::y().
Referenced by NESpaceToBatchLayerKernel::configure(), and CLSpaceToBatchLayerKernel::configure().
|
inline |
Calculate the space to batch output shape of a tensor.
[in] | input | Input tensor info |
[in] | block_shape | Block shape value |
Definition at line 1232 of file ShapeCalculator.h.
References arm_compute::CHANNEL, arm_compute::test::validation::data_layout, arm_compute::get_data_layout_dimension_index(), arm_compute::HEIGHT, arm_compute::test::validation::idx_height, arm_compute::test::validation::idx_width, arm_compute::test::validation::input, arm_compute::test::validation::output_shape, and arm_compute::WIDTH.
Referenced by NESpaceToDepthLayerKernel::configure(), and CLSpaceToDepthLayerKernel::configure().
|
inline |
Calculate the split output shape of a tensor.
[in] | input | Input tensor info |
[in] | axis | Axis on which to split the input |
[in] | num_splits | Number of splits |
Definition at line 1171 of file ShapeCalculator.h.
References arm_compute::test::validation::input, and TensorShape::set().
Referenced by CPPSplit< CLSlice, ICLTensor >::configure(), and CPPSplit< CLSlice, ICLTensor >::validate().
|
inline |
Calculate the stack output shape of a tensor.
[in] | a | Input tensor info |
[in] | axis | Axis on which to perform the stack operation |
[in] | num_tensors | Number of tensors to stack |
Definition at line 1446 of file ShapeCalculator.h.
References ARM_COMPUTE_ERROR_ON, ITensorInfo::num_dimensions(), TensorShape::set(), and ITensorInfo::tensor_shape().
Referenced by StackLayerNode::compute_output_descriptor().
|
inline |
Calculate the strided slice output shape of a tensor.
[in] | input | Input tensor info |
[in] | starts | The starts of the dimensions of the input tensor to be sliced |
[in] | ends | The ends of the dimensions of the input tensor to be sliced |
[in] | strides | The strides of the dimensions of the input tensor to be sliced |
[in] | begin_mask | If the ith bit of begin_mask is set, starts[i] is ignored and the fullest possible range in that dimension is used instead. |
[in] | end_mask | If the ith bit of end_mask is set, ends[i] is ignored and the fullest possible range in that dimension is used instead. |
[in] | shrink_axis_mask | If the ith bit of shrink_axis_mask is set, it implies that the ith specification shrinks the dimensionality by 1 |
Definition at line 1078 of file ShapeCalculator.h.
References arm_compute::helpers::tensor_transform::compute_strided_slice_output_shape(), and arm_compute::test::validation::input.
Referenced by CLStridedSliceKernel::configure().
|
inline |
Calculate the tiled shape of a tensor.
[in] | input_shape | Input tensor shape |
[in] | multiples | Paddings list |
Definition at line 1295 of file ShapeCalculator.h.
References arm_compute::test::validation::input_shape, and TensorShape::set().
Referenced by NETileKernel::configure(), CLTileKernel::configure(), and arm_compute::test::validation::reference::tile().
|
inline |
Calculate the transposed 1xW shape.
[in] | b | Input tensor info |
Definition at line 298 of file ShapeCalculator.h.
References arm_compute::test::validation::b.
Referenced by CpuGemmLowpMatrixMultiplyCore::configure().
|
inline |
Calculate the transposed 1xW width element shape.
[in] | b | Input tensor info |
[in] | mult_transpose1xW_width | (Optional) Transpose1xW width |
Definition at line 315 of file ShapeCalculator.h.
References ARM_COMPUTE_ERROR_ON, and arm_compute::test::validation::b.
Referenced by CpuGemmTranspose1xWKernel::configure(), CpuGemmTranspose1xWKernel::validate(), and CpuGemm::validate().
|
inline |
Calculate the transposed shape of a tensor.
[in] | input | Input tensor info |
Definition at line 404 of file ShapeCalculator.h.
References arm_compute::test::validation::input.
Referenced by CpuTransposeKernel::configure(), ClTransposeKernel::configure(), NELSTMLayer::configure(), CLLSTMLayer::configure(), CpuTransposeKernel::validate(), ClTransposeKernel::validate(), CpuMatMul::validate(), CpuFullyConnected::validate(), ClFullyConnected::validate(), NELSTMLayer::validate(), and CLLSTMLayer::validate().
|
inline |
Calculate the output unpool shape of a tensor.
[in] | input | Input tensor info |
[in] | pool_info | Pooling layer info |
Definition at line 837 of file ShapeCalculator.h.
References ARM_COMPUTE_ERROR_ON, arm_compute::get_data_layout_dimension_index(), Size2D::height, arm_compute::HEIGHT, arm_compute::test::validation::idx_height, arm_compute::test::validation::idx_width, arm_compute::test::validation::input, arm_compute::test::validation::input_shape, arm_compute::test::validation::output_shape, PadStrideInfo::pad_bottom(), PadStrideInfo::pad_left(), PadStrideInfo::pad_right(), PoolingLayerInfo::pad_stride_info, PadStrideInfo::pad_top(), PoolingLayerInfo::pool_size, PadStrideInfo::stride(), Size2D::width, and arm_compute::WIDTH.
Referenced by CpuMaxUnpoolingLayerKernel::configure(), and CLMaxUnpoolingLayerKernel::configure().
|
inline |
Calculate the upsampled shape of a tensor.
[in] | input | Input tensor info |
[in] | info | Contains stride information (x and y) |
Definition at line 1336 of file ShapeCalculator.h.
References arm_compute::test::validation::data_layout, arm_compute::get_data_layout_dimension_index(), arm_compute::HEIGHT, arm_compute::test::validation::idx_height, arm_compute::test::validation::idx_width, arm_compute::test::validation::info, arm_compute::test::validation::input, TensorShape::set(), and arm_compute::WIDTH.
|
inline |
Calculate the output tensor shape of a vector input given the convolution dimensions.
[in] | input | Input tensor shape |
[in] | conv_w | Convolution width |
[in] | conv_h | Convolution height |
[in] | data_layout | Data layout |
Definition at line 89 of file ShapeCalculator.h.
References arm_compute::CHANNEL, arm_compute::test::validation::data_layout, arm_compute::get_data_layout_dimension_index(), arm_compute::HEIGHT, arm_compute::test::validation::input, arm_compute::test::validation::output_shape, and arm_compute::WIDTH.
|
inline |
Calculate the reshaped shape of the weights.
[in] | weights | Weights tensor info |
[in] | has_bias | (Optional) Set to true if there is bias |
[in] | num_groups | (Optional) Number of groups |
Definition at line 151 of file ShapeCalculator.h.
References ARM_COMPUTE_ERROR_ON, TensorShape::collapse(), ITensorInfo::data_layout(), ITensorInfo::dimension(), arm_compute::test::validation::has_bias, arm_compute::NHWC, ITensorInfo::num_dimensions(), arm_compute::test::validation::num_groups, TensorShape::set(), and ITensorInfo::tensor_shape().
Referenced by ClWeightsReshapeKernel::configure(), ClGemmConv2d::validate(), and CpuGemmConv2d::validate().
|
inline |
Calculate the winograd filter transform shape.
[in] | input | Input tensor info |
[in] | winograd_info | Winograd information |
Definition at line 620 of file ShapeCalculator.h.
References Size2D::area(), arm_compute::CHANNEL, Window::DimX, Window::DimY, Window::DimZ, arm_compute::get_data_layout_dimension_index(), Size2D::height, arm_compute::test::validation::input, WinogradInfo::kernel_size, WinogradInfo::output_tile_size, Size2D::width, and arm_compute::WIDTH.
Referenced by ClWinogradFilterTransformKernel::configure().
|
inline |
Calculate the winograd input transform shape.
[in] | input | Input tensor info |
[in] | winograd_info | Winograd information |
Definition at line 643 of file ShapeCalculator.h.
References Size2D::area(), arm_compute::CHANNEL, arm_compute::compute_winograd_convolution_tiles(), arm_compute::test::validation::conv_info, WinogradInfo::convolution_info, arm_compute::get_data_layout_dimension_index(), Size2D::height, arm_compute::HEIGHT, arm_compute::test::validation::input, WinogradInfo::kernel_size, arm_compute::test::validation::output_shape, WinogradInfo::output_tile_size, Size2D::width, and arm_compute::WIDTH.
Referenced by ClWinogradInputTransformKernel::configure().
|
inline |
Calculate the winograd output transform shape.
[in] | input | Input tensor info |
[in] | winograd_info | Winograd information |
Definition at line 679 of file ShapeCalculator.h.
References arm_compute::CHANNEL, arm_compute::test::validation::conv_info, WinogradInfo::convolution_info, arm_compute::test::validation::data_layout, arm_compute::get_data_layout_dimension_index(), Size2D::height, arm_compute::HEIGHT, arm_compute::test::validation::input, WinogradInfo::input_dimensions, WinogradInfo::kernel_size, WinogradInfo::output_data_layout, arm_compute::scaled_dimensions(), Size2D::width, and arm_compute::WIDTH.
Referenced by ClWinogradOutputTransformKernel::configure().
|
inline |
Definition at line 1367 of file ShapeCalculator.h.
References ITensorInfo::tensor_shape().
|
inline |
Definition at line 1372 of file ShapeCalculator.h.
|
inline |
Definition at line 1363 of file ShapeCalculator.h.
References ITensorInfo::tensor_shape().
|
inline |
Get the tensor shape.
[in] | data | Input data |
Definition at line 1358 of file ShapeCalculator.h.
Referenced by calculate_concatenate_shape().
|
inline |
Definition at line 1377 of file ShapeCalculator.h.