24.02.1
|
Go to the documentation of this file.
51 std::fill_n(
dst.data(),
dst.num_elements(), 0);
52 const auto w_indices =
static_cast<int>(indices.
shape()[0]);
53 const auto h_indices =
static_cast<int>(indices.
shape()[1]);
54 const auto z_indices =
static_cast<int>(indices.
shape()[2]);
55 const auto b_indices =
static_cast<int>(indices.
shape()[3]);
56 const auto w_dst =
static_cast<int>(
dst.shape()[0]);
57 const auto h_dst =
static_cast<int>(
dst.shape()[1]);
58 const auto z_dst =
static_cast<int>(
dst.shape()[2]);
59 for(
int b = 0;
b < b_indices; ++
b)
61 for(
int r = 0; r < z_indices; ++r)
63 for(
int h = 0; h < h_indices; ++h)
65 for(
int w = 0;
w < w_indices; ++
w)
67 const uint32_t index_into_dst = indices[
b * z_indices * h_indices * w_indices + r * h_indices * w_indices + h * w_indices +
w];
68 const auto input_val =
src[
b * z_indices * h_indices * w_indices + r * h_indices * w_indices + h * w_indices +
w];
69 auto *ptr = &
dst[
b * z_dst * h_dst * w_dst];
70 ptr[index_into_dst] = input_val;
SimpleTensor< float > src
Quantization information.
DataLayout
[DataLayout enum definition]
TensorShape shape() const override
Shape of the tensor.
SimpleTensor< float > convert_from_asymmetric(const SimpleTensor< uint8_t > &src)
#define ARM_COMPUTE_ERROR_ON(cond)
If the condition is true then an error message is printed and an exception thrown.
SimpleTensor< T > max_unpooling_layer(const SimpleTensor< T > &src, const PoolingLayerInfo &info, const QuantizationInfo &output_qinfo, SimpleTensor< uint32_t > &indices, TensorShape output_shape, DataLayout data_layout)
Pooling Layer Information struct.
#define ARM_COMPUTE_UNUSED(...)
To avoid unused variables warnings.
const DataLayout data_layout
Simple tensor object that stores elements in a consecutive chunk of memory.
Copyright (c) 2017-2024 Arm Limited.
ScaleKernelInfo info(interpolation_policy, default_border_mode, PixelValue(), sampling_policy, false)
SimpleTensor< uint8_t > max_unpooling_layer< uint8_t >(const SimpleTensor< uint8_t > &src, const PoolingLayerInfo &info, const QuantizationInfo &output_qinfo, SimpleTensor< uint32_t > &indices, TensorShape output_shape, DataLayout data_layout)
SimpleTensor< T > max_unpooling_layer_internal(const SimpleTensor< T > &src, const PoolingLayerInfo &info, const QuantizationInfo &output_qinfo, SimpleTensor< uint32_t > &indices, TensorShape output_shape, DataLayout data_layout)