6 #include "../TestUtils.hpp" 10 #include <boost/test/unit_test.hpp> 12 using namespace armnn;
21 std::string permuteLayerName =
"permute";
30 .SetTensorInfo(infoIn);
35 permuteLayerName.c_str())
37 .SetTensorInfo(infoOut);
40 &IsLayerOfType<armnn::PermuteLayer>, &IsLayerOfType<armnn::OutputLayer>));
46 auto checkReshape = [&infoOut](
const armnn::Layer*
const layer) ->
bool {
48 return IsLayerOfType<armnn::ReshapeLayer>(layer) &&
49 (reshapeLayer->GetParameters().m_TargetShape == infoOut.GetShape()) &&
50 (reshapeLayer->GetOutputHandler().GetTensorInfo().GetShape() == infoOut.GetShape());
54 &IsLayerOfType<armnn::OutputLayer>));
56 std::list<std::string> testRelatedLayers = { permuteLayerName };
57 BOOST_TEST(CheckRelatedLayers<armnn::ReshapeLayer>(graph, testRelatedLayers));
BOOST_AUTO_TEST_SUITE(TensorflowLiteParser)
Optimizer::Optimizations MakeOptimizations(Args &&... args)
LayerT * AddLayer(Args &&... args)
Adds a new layer, of type LayerType, to the graph constructed with the arguments passed.
ConstIterator cbegin() const
Returns const iterator pointing to the beginning of the list. Lowercase for range-based for loops...
static void Pass(Graph &graph, const Optimizations &optimizations)
This layer represents a reshape operation.
Copyright (c) 2020 ARM Limited.
This layer represents a permutation operation.
A layer user-provided data can be bound to (e.g. inputs, outputs).
BOOST_AUTO_TEST_CASE(CheckConvolution2dLayer)
OptimizeForType< PermuteLayer, PermuteAsReshapeImpl > PermuteAsReshape
BOOST_AUTO_TEST_SUITE_END()
bool CheckSequence(const armnn::Graph::ConstIterator first, const armnn::Graph::ConstIterator last)
ConstIterator cend() const
Returns const iterator pointing to the end of the list. Lowercase for range-based for loops...
LayerT * InsertNewLayer(InputSlot &insertBefore, Args &&... args)
Inserts a new layer between the output slot currently connected to insertBefore and insertBefore itse...
A PermuteDescriptor for the PermuteLayer.