Compute Library
DFT.cpp File Reference

Go to the source code of this file.


 Copyright (c) 2017-2021 Arm Limited.


 DATA_TEST_CASE (Real, framework::DatasetMode::ALL, shapes_1d_dft, shape)
 DATA_TEST_CASE (Complex, framework::DatasetMode::ALL, shapes_1d_dft, shape)
 TEST_SUITE_END () FIXTURE_DATA_TEST_CASE(RunSmall = ActivationValidationQuantizedFixture<CLTensor, CLAccessor, CLActivationLayer, T>
 [CLActivationLayer Test snippet] More...
std::uniform_real_distribution< float > distribution (-5.f, 5.f)
library fill (src, distribution, 0)
 validate (SimpleTensorAccessor< float >(src), backward, RelativeTolerance< float >(0.1f))
 DATA_TEST_CASE (Complex, framework::DatasetMode::ALL, shapes_2d_dft, shape)
std::uniform_real_distribution< float > distribution_b (0.f, 0.f)
library fill (w, distribution, 1)
library fill (b, distribution_b, 2)
dst_shape set (0, output_wh.first)
dst_shape set (1, output_wh.second)
dst_shape set (2, shape_w[3])
 validate (SimpleTensorAccessor< float >(dst), dst_ref, RelativeTolerance< float >(0.1f), 0.f, AbsoluteTolerance< float >(0.001f))


const bool is_odd = shape.x() % 2
auto forward = reference::rdft_2d(src)
auto backward = reference::ridft_2d(forward, is_odd)
SimpleTensor< float > src { shape_in, DataType::F32, 1 }
SimpleTensor< float > w { shape_w, DataType::F32, 1 }
SimpleTensor< float > b { TensorShape(shape_w[3]), DataType::F32, 1 }
const auto output_wh = arm_compute::scaled_dimensions(shape_in.x(), shape_in.y(), shape_w.x(), shape_w.y(), conv_info)
TensorShape dst_shape = shape_in
auto dst = reference::conv2d_dft(src, w, conv_info)
auto dst_ref = reference::convolution_layer(src, w, b, dst_shape, conv_info)