11 namespace optimizations
29 const TensorInfo& inInfo = parentOut->GetTensorInfo();
42 const std::string name = std::string(
"merged-") + base.
GetName() + std::string(
"-with-") + child.
GetName();
49 parentOut = &newReshape.GetOutputSlot();
const TensorShape & GetShape() const
OptimizeConsecutiveReshapesImpl()=default
A ReshapeDescriptor for the ReshapeLayer.
Layer & GetOwningLayer() const
This layer represents a reshape operation.
Copyright (c) 2020 ARM Limited.
unsigned int GetNumConnections() const override
const InputSlot & GetInputSlot(unsigned int index) const override
Get a const input slot handle by slot index.
void Run(Graph &graph, InputSlot &connection) const
Run for every connection between a base ReshapeLayer and a child ReshapeLayer.
void SetTensorInfo(const TensorInfo &tensorInfo)
Sets the TensorInfo used by this output handler.
~OptimizeConsecutiveReshapesImpl()=default
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.
const char * GetName() const override
Returns the name of the layer.
LayerT * InsertNewLayer(InputSlot &insertBefore, Args &&... args)
Inserts a new layer between the output slot currently connected to insertBefore and insertBefore itse...
void MoveAllConnections(OutputSlot &destination)
Moves all connections to another OutputSlot.
const TensorInfo & GetTensorInfo() const
Gets the matching TensorInfo for the output.