12 #include <boost/numeric/conversion/cast.hpp> 13 #include <boost/multi_array.hpp> 15 struct ActivationFixture
19 auto boostArrayExtents = boost::extents
21 [boost::numeric_cast<boost::multi_array_types::extent_gen::index>(channels)]
23 [boost::numeric_cast<boost::multi_array_types::extent_gen::index>(width)];
24 output.resize(boostArrayExtents);
25 outputExpected.resize(boostArrayExtents);
26 input.resize(boostArrayExtents);
28 unsigned int inputShape[] = { batchSize, channels, height, width };
29 unsigned int outputShape[] = { batchSize, channels, height, width };
34 input = MakeRandomTensor<float, 4>(inputTensorInfo, 21453);
37 unsigned int width = 17;
38 unsigned int height = 29;
39 unsigned int channels = 2;
40 unsigned int batchSize = 5;
42 boost::multi_array<float, 4> output;
43 boost::multi_array<float, 4> outputExpected;
44 boost::multi_array<float, 4> input;
59 input = MakeRandomTensor<float, 4>(inputTensorInfo, 2342423, 0.0f, 1.0f);
PositiveActivationFixture()
std::enable_if_t< std::is_unsigned< Source >::value &&std::is_unsigned< Dest >::value, Dest > numeric_cast(Source source)