21.02
|
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_reshaped_depthwise_weights_shape (const ITensorInfo &input, const DepthwiseConvolutionReshapeInfo &info) |
Calculate the reshaped shape of the weights to use in depthwise convolution. 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, PadStrideInfo conv_info, unsigned int depth_multiplier, const Size2D &dilation=Size2D(1U, 1U)) |
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 ITensorInfo &input, const ITensorInfo &weights, 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_gather_shape (const TensorShape &input_shape, const TensorShape &indices_shape, uint32_t actual_axis) |
|
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 1347 of file ShapeCalculator.h.
References ARM_COMPUTE_ERROR_ON, extract_shape(), arm_compute::MAX_DIMS, TensorShape::set(), and arm_compute::test::validation::shape.
Referenced by ConcatenateLayerNode::compute_output_descriptor(), CpuConcatenate::configure(), GCConcatenateLayer::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 50 of file ShapeCalculator.h.
References Dimensions< T >::begin(), arm_compute::convert_negative_axis(), Dimensions< T >::num_dimensions(), ITensorInfo::num_dimensions(), TensorShape::remove_dimension(), TensorShape::set(), and ITensorInfo::tensor_shape().
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 1332 of file ShapeCalculator.h.
References ARM_COMPUTE_ERROR_ON, arm_compute::test::validation::input_shape, Dimensions< T >::num_dimensions(), and TensorShape::remove_dimension().
|
inline |
Calculate the batch to space output shape of a tensor.
[in] | input | Input tensor info |
[in] | block_x | Block shape x value |
[in] | block_y | Block shape y value |
Definition at line 1065 of file ShapeCalculator.h.
References ARM_COMPUTE_ERROR_ON, arm_compute::BATCHES, arm_compute::test::validation::data_layout, ITensorInfo::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::output_shape, TensorShape::set(), ITensorInfo::tensor_shape(), and arm_compute::WIDTH.
Referenced by 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 395 of file ShapeCalculator.h.
References Size2D::area(), ARM_COMPUTE_ERROR_ON, arm_compute::CHANNEL, arm_compute::test::validation::data_layout, ITensorInfo::data_layout(), arm_compute::get_data_layout_dimension_index(), Size2D::height, arm_compute::HEIGHT, arm_compute::test::validation::num_groups, TensorShape::shift_right(), ITensorInfo::tensor_shape(), Size2D::width, and arm_compute::WIDTH.
|
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 519 of file ShapeCalculator.h.
References arm_compute::BATCHES, arm_compute::CHANNEL, arm_compute::test::validation::data_layout, ITensorInfo::data_layout(), arm_compute::get_data_layout_dimension_index(), arm_compute::HEIGHT, arm_compute::test::validation::input_shape, TensorShape::set(), ITensorInfo::tensor_shape(), and arm_compute::WIDTH.
Referenced by 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 487 of file ShapeCalculator.h.
References arm_compute::test::validation::data_layout, ITensorInfo::data_layout(), ITensorInfo::dimension(), arm_compute::get_data_layout_dimension_index(), arm_compute::HEIGHT, TensorShape::set(), ITensorInfo::tensor_shape(), 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 738 of file ShapeCalculator.h.
References arm_compute::CHANNEL, ITensorInfo::data_layout(), 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(), TensorShape::set(), ITensorInfo::tensor_shape(), weights_height, weights_width, and arm_compute::WIDTH.
Referenced by NEDirectConvolutionLayerKernel::configure(), and arm_compute::test::validation::DATA_TEST_CASE().
|
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 1090 of file ShapeCalculator.h.
References ARM_COMPUTE_ERROR_ON, 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::output_shape, TensorShape::set(), 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] | conv_info | Padding and stride information to use for the convolution. |
[in] | depth_multiplier | Multiplier to apply to the input's depth in order to retrieve the output's depth. |
[in] | dilation | Dilation, in elements, across x and y. Defaults to (1, 1). |
Definition at line 446 of file ShapeCalculator.h.
References arm_compute::CHANNEL, arm_compute::test::validation::data_layout, ITensorInfo::data_layout(), arm_compute::get_data_layout_dimension_index(), arm_compute::HEIGHT, arm_compute::test::validation::input_shape, arm_compute::test::validation::output_shape, arm_compute::scaled_dimensions(), TensorShape::set(), ITensorInfo::tensor_shape(), and arm_compute::WIDTH.
Referenced by GCDepthwiseConvolutionLayer3x3Kernel::configure(), NEDepthwiseConvolutionAssemblyDispatch::configure(), NEDepthwiseConvolutionLayerNativeKernel::configure(), CLDepthwiseConvolutionLayerNativeKernel::configure(), and NEDepthwiseConvolutionAssemblyDispatch::validate().
|
inline |
Calculate the flattened output shape of a tensor.
[in] | input | Input tensor info |
Definition at line 587 of file ShapeCalculator.h.
References TensorShape::collapse(), arm_compute::test::validation::output_shape, and ITensorInfo::tensor_shape().
Referenced by NEFlattenLayer::configure(), CLFlattenLayer::configure(), NEFlattenLayer::validate(), CLFlattenLayer::validate(), NEFullyConnectedLayer::validate(), and CLFullyConnectedLayer::validate().
|
inline |
Definition at line 1411 of file ShapeCalculator.h.
References ARM_COMPUTE_ERROR_ON, arm_compute::test::validation::input_shape, Dimensions< T >::num_dimensions(), and arm_compute::test::validation::output_shape.
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 |
Definition at line 549 of file ShapeCalculator.h.
References Size2D::area(), ARM_COMPUTE_ERROR_ON, arm_compute::CHANNEL, arm_compute::test::validation::data_layout, ITensorInfo::data_layout(), arm_compute::get_data_layout_dimension_index(), Size2D::height, arm_compute::HEIGHT, arm_compute::NCHW, Dimensions< T >::num_dimensions(), arm_compute::test::validation::num_groups, arm_compute::test::validation::output_shape, TensorShape::remove_dimension(), arm_compute::scaled_dimensions(), TensorShape::set(), ITensorInfo::tensor_shape(), Size2D::width, and arm_compute::WIDTH.
Referenced by CLGEMMConvolutionLayer::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 260 of file ShapeCalculator.h.
References ARM_COMPUTE_ERROR_ON, ITensorInfo::dimension(), M, TensorShape::set(), and ITensorInfo::tensor_shape().
Referenced by NEGEMMInterleave4x4Kernel::configure(), NEGEMMLowpMatrixMultiplyCore::configure(), and NEGEMM::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 180 of file ShapeCalculator.h.
References ARM_COMPUTE_ERROR_ON, ITensorInfo::dimension(), input_height, input_width, GEMMLHSMatrixInfo::k0, GEMMLHSMatrixInfo::m0, TensorShape::remove_dimension(), TensorShape::set(), ITensorInfo::tensor_shape(), and GEMMLHSMatrixInfo::v0.
Referenced by CLGEMMReshapeRHSMatrixKernelManaged::configure().
|
inline |
Calculate the min/max shape output shape of a tensor.
[in] | input | Input tensor info |
Definition at line 770 of file ShapeCalculator.h.
References Window::DimX, arm_compute::test::validation::output_shape, 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] | is_interleaved_transposed | True if the input is interleaved transposed |
[in] | reshape_info | GEMM reshape info |
Definition at line 889 of file ShapeCalculator.h.
References ARM_COMPUTE_ERROR_ON_MSG, GEMMReshapeInfo::depth_output_gemm3d(), ITensorInfo::dimension(), GEMMReshapeInfo::m(), GEMMReshapeInfo::n(), ITensorInfo::num_dimensions(), arm_compute::test::validation::output_shape, GEMMReshapeInfo::reinterpret_input_as_3d(), TensorShape::set(), and ITensorInfo::tensor_shape().
Referenced by NEGEMM::validate(), and CLGEMMLowpMatrixMultiplyCore::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 reshape info |
Definition at line 925 of file ShapeCalculator.h.
References ARM_COMPUTE_ERROR_ON_MSG, ARM_COMPUTE_UNUSED, GEMMReshapeInfo::depth_output_gemm3d(), GEMMReshapeInfo::m(), GEMMReshapeInfo::n(), ITensorInfo::num_dimensions(), arm_compute::test::validation::output_shape, GEMMReshapeInfo::reinterpret_input_as_3d(), 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] | gemm_info | GEMM kernel info used to retrieve the original dimensions of the input matrices |
Definition at line 963 of file ShapeCalculator.h.
References ARM_COMPUTE_ERROR_ON_MSG, ARM_COMPUTE_UNUSED, GEMMKernelInfo::depth_output_gemm3d, GEMMKernelInfo::m, GEMMKernelInfo::n, ITensorInfo::num_dimensions(), arm_compute::test::validation::output_shape, GEMMKernelInfo::reinterpret_input_as_3d, TensorShape::set(), 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 1001 of file ShapeCalculator.h.
References ARM_COMPUTE_ERROR_ON, ITensorInfo::data_layout(), arm_compute::NHWC, arm_compute::test::validation::output_shape, TensorShape::shift_right(), ITensorInfo::tensor_shape(), Dimensions< T >::x(), and Dimensions< T >::y().
|
inline |
Calculate the padded shape of a tensor.
[in] | input_shape | Input tensor shape |
[in] | padding | Paddings list |
Definition at line 1219 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 108 of file ShapeCalculator.h.
References arm_compute::test::validation::output_shape, arm_compute::permute(), and ITensorInfo::tensor_shape().
Referenced by CpuPermuteKernel::configure(), CPPPermuteKernel::configure(), CpuSoftmaxGeneric< IS_LOG >::validate(), and CLSoftmaxLayerGeneric< IS_LOG >::validate().
|
inline |
Calculate the output pool shape of a tensor.
[in] | input | Input tensor info |
[in] | pool_info | Pooling layer info |
Definition at line 787 of file ShapeCalculator.h.
References ITensorInfo::data_layout(), arm_compute::get_data_layout_dimension_index(), Size2D::height, arm_compute::HEIGHT, arm_compute::test::validation::idx_height, arm_compute::test::validation::idx_width, PoolingLayerInfo::is_global_pooling, arm_compute::test::validation::output_shape, PoolingLayerInfo::pad_stride_info, PoolingLayerInfo::pool_size, arm_compute::scaled_dimensions(), TensorShape::set(), ITensorInfo::tensor_shape(), Size2D::width, and arm_compute::WIDTH.
Referenced by CpuPoolingAssemblyWrapperKernel::configure(), and arm_compute::test::validation::reference::pooling_layer_internal().
|
inline |
Calculate the prior box output shape of a tensor.
[in] | input | Input tensor info |
[in] | info | PriorBoxLayer info |
Definition at line 1198 of file ShapeCalculator.h.
References PriorBoxLayerInfo::aspect_ratios(), arm_compute::test::validation::data_layout, ITensorInfo::data_layout(), ITensorInfo::dimension(), arm_compute::get_data_layout_dimension_index(), arm_compute::HEIGHT, PriorBoxLayerInfo::max_sizes(), PriorBoxLayerInfo::min_sizes(), arm_compute::test::validation::output_shape, TensorShape::set(), 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 1256 of file ShapeCalculator.h.
References arm_compute::test::validation::output_shape, TensorShape::remove_dimension(), and TensorShape::set().
Referenced by NEReductionOperation::configure(), NEReductionOperationKernel::configure(), CLArgMinMaxLayer::configure(), CLReductionOperation::configure(), ReductionLayerNode::configure_output(), ArgMinMaxLayerNode::configure_output(), arm_compute::test::validation::DATA_TEST_CASE(), NEReductionOperation::validate(), CLArgMinMaxLayer::validate(), and CLReductionOperation::validate().
|
inline |
Calculate the reductionA shape used in GEMMLowp.
[in] | b | Input tensor info |
Definition at line 357 of file ShapeCalculator.h.
References TensorShape::remove_dimension(), and ITensorInfo::tensor_shape().
Referenced by NEGEMMLowpMatrixMultiplyCore::configure(), CLGEMMLowpMatrixMultiplyCore::configure(), NEGEMMLowpMatrixMultiplyCore::validate(), and CLGEMMLowpMatrixMultiplyCore::validate().
|
inline |
Calculate the reductionB shape used in GEMMLowp.
[in] | a | Input tensor info |
Definition at line 374 of file ShapeCalculator.h.
References ITensorInfo::dimension(), Window::DimX, TensorShape::remove_dimension(), TensorShape::set(), and ITensorInfo::tensor_shape().
Referenced by NEGEMMLowpMatrixMultiplyCore::configure(), CLGEMMLowpMatrixMultiplyCore::configure(), NEGEMMLowpMatrixMultiplyCore::validate(), and CLGEMMLowpMatrixMultiplyCore::validate().
|
inline |
Calculate the output shape of the reorg layer given a stride.
[in] | input | Input tensor info |
[in] | stride | Stride |
Definition at line 122 of file ShapeCalculator.h.
References ARM_COMPUTE_ERROR_ON, ARM_COMPUTE_ERROR_ON_MSG, arm_compute::CHANNEL, ITensorInfo::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::output_shape, TensorShape::set(), ITensorInfo::tensor_shape(), and arm_compute::WIDTH.
Referenced by NEReorgLayerKernel::configure(), CLReorgLayerKernel::configure(), and arm_compute::test::validation::reference::reorg_layer().
|
inline |
Calculate the reshaped shape of the weights to use in depthwise convolution.
[in] | input | Input tensor info |
[in] | info | Depthwise convolution information to be used for reshaping. |
Definition at line 297 of file ShapeCalculator.h.
References DepthwiseConvolutionReshapeInfo::c0, arm_compute::CHANNEL, arm_compute::test::validation::data_layout, ITensorInfo::data_layout(), ITensorInfo::dimension(), arm_compute::DIV_CEIL(), arm_compute::get_data_layout_dimension_index(), arm_compute::HEIGHT, and arm_compute::WIDTH.
|
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 224 of file ShapeCalculator.h.
References ARM_COMPUTE_ERROR_ON, ITensorInfo::dimension(), GEMMRHSMatrixInfo::h0, input_height, input_width, GEMMRHSMatrixInfo::k0, GEMMRHSMatrixInfo::n0, TensorShape::set(), and ITensorInfo::tensor_shape().
Referenced by CLGEMMDefaultConfigReshapedBifrost::configure(), CLGEMMDefaultConfigReshapedRHSOnlyBifrost::configure(), CLGEMMReshapeRHSMatrixKernelManaged::configure(), arm_compute::test::validation::DATA_TEST_CASE(), arm_compute::cl_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 872 of file ShapeCalculator.h.
References arm_compute::test::validation::output_shape, TensorShape::set(), and ITensorInfo::tensor_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 851 of file ShapeCalculator.h.
References ITensorInfo::data_layout(), 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::output_shape, ROIPoolingLayerInfo::pooled_height(), ROIPoolingLayerInfo::pooled_width(), TensorShape::set(), ITensorInfo::tensor_shape(), 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 1048 of file ShapeCalculator.h.
References arm_compute::helpers::tensor_transform::compute_strided_slice_output_shape(), and arm_compute::helpers::tensor_transform::construct_slice_end_mask().
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 605 of file ShapeCalculator.h.
References TensorShape::collapse(), Dimensions< T >::collapse_from(), Dimensions< T >::num_dimensions(), TensorShape::shift_right(), and ITensorInfo::tensor_shape().
|
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 1149 of file ShapeCalculator.h.
References ARM_COMPUTE_ERROR_ON, arm_compute::BATCHES, arm_compute::test::validation::data_layout, ITensorInfo::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::output_shape, TensorShape::set(), ITensorInfo::tensor_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 1175 of file ShapeCalculator.h.
References arm_compute::CHANNEL, arm_compute::test::validation::data_layout, ITensorInfo::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::output_shape, TensorShape::set(), ITensorInfo::tensor_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 1114 of file ShapeCalculator.h.
References Dimensions< T >::num_dimensions(), TensorShape::set(), and ITensorInfo::tensor_shape().
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 1389 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 1032 of file ShapeCalculator.h.
References arm_compute::helpers::tensor_transform::compute_strided_slice_output_shape(), and ITensorInfo::tensor_shape().
|
inline |
Calculate the tiled shape of a tensor.
[in] | input_shape | Input tensor shape |
[in] | multiples | Paddings list |
Definition at line 1238 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 320 of file ShapeCalculator.h.
References ITensorInfo::dimension(), TensorShape::set(), and ITensorInfo::tensor_shape().
Referenced by NEGEMMLowpMatrixMultiplyCore::configure().
|
inline |
Calculate the transposed 1xW width element shape.
[in] | b | Input tensor info |
[in] | mult_transpose1xW_width | (Optional) Transpose1xW width |
Definition at line 337 of file ShapeCalculator.h.
References ARM_COMPUTE_ERROR_ON, ITensorInfo::dimension(), ITensorInfo::element_size(), TensorShape::set(), and ITensorInfo::tensor_shape().
Referenced by NEGEMM::validate().
|
inline |
Calculate the transposed shape of a tensor.
[in] | input | Input tensor info |
Definition at line 426 of file ShapeCalculator.h.
References ITensorInfo::dimension(), TensorShape::set(), and ITensorInfo::tensor_shape().
Referenced by NELSTMLayer::configure(), CLLSTMLayer::configure(), NELSTMLayer::validate(), NEFullyConnectedLayer::validate(), CLFullyConnectedLayer::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 819 of file ShapeCalculator.h.
References ARM_COMPUTE_ERROR_ON, ITensorInfo::data_layout(), 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_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, TensorShape::set(), PadStrideInfo::stride(), ITensorInfo::tensor_shape(), Size2D::width, and arm_compute::WIDTH.
Referenced by CLMaxUnpoolingLayerKernel::configure(), and NEMaxUnpoolingLayerKernel::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 1279 of file ShapeCalculator.h.
References arm_compute::test::validation::data_layout, ITensorInfo::data_layout(), ITensorInfo::dimension(), arm_compute::get_data_layout_dimension_index(), arm_compute::HEIGHT, arm_compute::test::validation::idx_height, arm_compute::test::validation::idx_width, ITensorInfo::tensor_shape(), arm_compute::WIDTH, Size2D::x(), and Size2D::y().
|
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 87 of file ShapeCalculator.h.
References arm_compute::CHANNEL, arm_compute::get_data_layout_dimension_index(), arm_compute::HEIGHT, arm_compute::test::validation::output_shape, TensorShape::set(), arm_compute::WIDTH, and Dimensions< T >::x().
|
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 149 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 GCWeightsReshapeKernel::configure(), CLWeightsReshapeKernel::configure(), NEGEMMConvolutionLayer::validate(), and CLGEMMConvolutionLayer::validate().
|
inline |
Calculate the winograd filter transform shape.
[in] | input | Input tensor info |
[in] | winograd_info | Winograd information |
Definition at line 644 of file ShapeCalculator.h.
References Size2D::area(), arm_compute::CHANNEL, ITensorInfo::data_layout(), ITensorInfo::dimension(), Window::DimX, Window::DimY, Window::DimZ, arm_compute::get_data_layout_dimension_index(), Size2D::height, WinogradInfo::kernel_size, WinogradInfo::output_tile_size, ITensorInfo::tensor_shape(), Size2D::width, and arm_compute::WIDTH.
Referenced by CLWinogradFilterTransformKernel::configure(), NEWinogradConvolutionLayer::validate(), and CLWinogradConvolutionLayer::validate().
|
inline |
Calculate the winograd input transform shape.
[in] | input | Input tensor info |
[in] | winograd_info | Winograd information |
Definition at line 667 of file ShapeCalculator.h.
References Size2D::area(), arm_compute::CHANNEL, arm_compute::compute_winograd_convolution_tiles(), WinogradInfo::convolution_info, ITensorInfo::data_layout(), arm_compute::get_data_layout_dimension_index(), Size2D::height, arm_compute::HEIGHT, WinogradInfo::kernel_size, arm_compute::test::validation::output_shape, WinogradInfo::output_tile_size, TensorShape::set(), ITensorInfo::tensor_shape(), Size2D::width, and arm_compute::WIDTH.
Referenced by CLWinogradInputTransformKernel::configure(), NEWinogradConvolutionLayer::validate(), and CLWinogradConvolutionLayer::validate().
|
inline |
Calculate the winograd output transform shape.
[in] | input | Input tensor info |
[in] | winograd_info | Winograd information |
Definition at line 703 of file ShapeCalculator.h.
References arm_compute::CHANNEL, WinogradInfo::convolution_info, arm_compute::test::validation::data_layout, ITensorInfo::dimension(), arm_compute::get_data_layout_dimension_index(), Size2D::height, arm_compute::HEIGHT, WinogradInfo::input_dimensions, WinogradInfo::kernel_size, WinogradInfo::output_data_layout, arm_compute::scaled_dimensions(), ITensorInfo::tensor_shape(), Size2D::width, and arm_compute::WIDTH.
Referenced by CLWinogradOutputTransformKernel::configure().
|
inline |
Get the tensor shape.
[in] | data | Input data |
Definition at line 1301 of file ShapeCalculator.h.
Referenced by calculate_concatenate_shape().
|
inline |
Definition at line 1306 of file ShapeCalculator.h.
References ITensorInfo::tensor_shape().
|
inline |
Definition at line 1310 of file ShapeCalculator.h.
References ITensorInfo::tensor_shape().
|
inline |
Definition at line 1315 of file ShapeCalculator.h.
|
inline |
Definition at line 1320 of file ShapeCalculator.h.