45 BOOST_ASSERT(inferredShapes.size() == 1);
47 ConditionalThrowIfNotEqual<LayerValidationException>(
48 "ReshapeLayer: TensorShape set on OutputSlot[0] does not match the inferred shape.",
ReshapeDescriptor m_Param
The parameters for the layer (not including tensor-valued weights etc.).
const ReshapeDescriptor & GetParameters() const
const TensorShape & GetShape() const
virtual std::unique_ptr< IWorkload > CreateWorkload(const IWorkloadFactory &factory) const override
Makes a workload for the Reshape type.
A ReshapeDescriptor for the ReshapeLayer.
This layer represents a reshape operation.
ReshapeLayer * Clone(Graph &graph) const override
Creates a dynamically-allocated copy of this layer.
Copyright (c) 2020 ARM Limited.
void IgnoreUnused(Ts &&...)
TensorShape m_TargetShape
Target shape value.
void VerifyLayerConnections(unsigned int expectedConnections, const CheckLocation &location) const
void Accept(ILayerVisitor &visitor) const override
Apply a visitor to this layer.
virtual std::unique_ptr< IWorkload > CreateReshape(const ReshapeQueueDescriptor &descriptor, const WorkloadInfo &info) const
ReshapeLayer(const ReshapeDescriptor &desc, const char *name)
Constructor to create a ReshapeLayer.
void ValidateTensorShapesFromInputs() override
Check if the input tensor shape(s) will lead to a valid configuration of ReshapeLayer.
virtual void VisitReshapeLayer(const IConnectableLayer *layer, const ReshapeDescriptor &reshapeDescriptor, const char *name=nullptr)=0
Function a reshape layer should call back to when its Accept(ILayerVisitor&) function is invoked...
WorkloadInfo PrepInfoAndDesc(QueueDescriptor &descriptor) const
Helper function to reduce duplication in *LayerCreateWorkload.
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.
std::vector< TensorShape > InferOutputShapes(const std::vector< TensorShape > &inputShapes) const override
By default returns inputShapes if the number of inputs are equal to number of outputs, otherwise infers the output shapes from given input shapes and layer properties.
const TensorInfo & GetTensorInfo() const override