Compute Library
 21.11
ShapeCalculator.h File Reference

Go to the source code of this file.

Namespaces

 arm_compute
 Copyright (c) 2017-2021 Arm Limited.
 
 arm_compute::misc
 
 arm_compute::misc::shape_calculator
 

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)
 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_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_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 (const ITensorInfo *input, const int block_x, const int block_y)
 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, const int block_x, const 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_gather_shape (const TensorShape &input_shape, const TensorShape &indices_shape, uint32_t actual_axis)