13 namespace optimizations
30 if (CanMoveTransposeToInputs(base))
32 auto transpose = boost::polymorphic_downcast<TransposeLayer*>(&connection.
GetOwningLayer());
39 const std::string name = std::string(
"moved_up-") + transpose->GetName();
49 const TensorInfo& childOutInfo = transpose->GetOutputHandler().GetTensorInfo();
53 transpose->GetOutputSlot().MoveAllConnections(base.
GetOutputSlot());
63 static bool CanMoveTransposeToInputs(
const Layer& base)
std::vector< InputSlot >::iterator EndInputSlots()
MoveTransposeUpImpl()=default
Layer & GetOwningLayer() const
Copyright (c) 2020 ARM Limited.
std::vector< InputSlot >::iterator BeginInputSlots()
unsigned int GetNumConnections() const override
const InputSlot & GetInputSlot(unsigned int index) const override
Get a const input slot handle by slot index.
~MoveTransposeUpImpl()=default
This layer represents a transpose operation.
void SetTensorInfo(const TensorInfo &tensorInfo)
Sets the TensorInfo used by this output handler.
void Run(Graph &graph, InputSlot &connection) const
Run for every connection between a base Layer (any) and a child TransposeLayer.
const OutputHandler & GetOutputHandler(unsigned int i=0) const
LayerType GetType() const
const OutputSlot & GetOutputSlot(unsigned int index=0) const override
Get the const output slot handle by slot index.
armnn::TensorShape TransposeTensorShape(const armnn::TensorShape &srcShape, const armnn::PermutationVector &mappings)
LayerT * InsertNewLayer(InputSlot &insertBefore, Args &&... args)
Inserts a new layer between the output slot currently connected to insertBefore and insertBefore itse...