38 BOOST_ASSERT(inputShapes.size() == 1);
49 BOOST_ASSERT(inferredShapes.size() == 1);
51 ConditionalThrowIfNotEqual<LayerValidationException>(
52 "PermuteLayer: TensorShape set on OutputSlot[0] does not match the inferred shape.",
const char * GetName() const override
void Permute(const armnn::TensorShape &dstShape, const armnn::PermutationVector &mappings, const void *src, void *dst, size_t dataTypeSize)
virtual const TensorInfo & GetTensorInfo() const =0
armnn::TensorShape Permuted(const armnn::TensorShape &srcShape, const armnn::PermutationVector &mappings)
virtual void VisitPermuteLayer(const IConnectableLayer *layer, const PermuteDescriptor &permuteDescriptor, const char *name=nullptr)=0
PermuteLayer * Clone(Graph &graph) const override
void ValidateTensorShapesFromInputs() override
const PermuteDescriptor & GetParameters() const
virtual std::unique_ptr< IWorkload > CreateWorkload(const IWorkloadFactory &factory) const override
This layer represents a permutation operation.
PermuteDescriptor m_Param
The parameters for the layer (not including tensor-valued weights etc.).
void VerifyLayerConnections(unsigned int expectedConnections, const CheckLocation &location) const
void Accept(ILayerVisitor &visitor) const override
WorkloadInfo PrepInfoAndDesc(QueueDescriptor &descriptor) const
Helper function to reduce duplication in *LayerCreateWorkload.
std::vector< TensorShape > InferOutputShapes(const std::vector< TensorShape > &inputShapes) const override
PermutationVector m_DimMappings
Indicates how to translate tensor elements from a given source into the target destination, when source and target potentially have different memory layouts e.g. {0U, 3U, 1U, 2U}.
virtual std::unique_ptr< IWorkload > CreatePermute(const PermuteQueueDescriptor &descriptor, const WorkloadInfo &info) const
A PermuteDescriptor for the PermuteLayer.
PermuteLayer(const PermuteDescriptor ¶m, const char *name)
const TensorShape & GetShape() const
const TensorInfo & GetTensorInfo() const override
const OutputSlot & GetOutputSlot(unsigned int index=0) const override
const InputSlot & GetInputSlot(unsigned int index) const override