From d5d43d82c0137e08553e44345c609cdd1a7931c7 Mon Sep 17 00:00:00 2001 From: Nikhil Raj Date: Fri, 17 Jun 2022 13:24:58 +0100 Subject: Update Doxygen for 22.05 patch release * Pooling3D added to tfLite delegate * Available in tag 22.05.01 Signed-off-by: Nikhil Raj Change-Id: I8d605bba4e87d30baa2c6d7b338c78a4400dc021 --- 22.05.01/_quantize_layer_8cpp_source.xhtml | 151 +++++++++++++++++++++++++++++ 1 file changed, 151 insertions(+) create mode 100644 22.05.01/_quantize_layer_8cpp_source.xhtml (limited to '22.05.01/_quantize_layer_8cpp_source.xhtml') diff --git a/22.05.01/_quantize_layer_8cpp_source.xhtml b/22.05.01/_quantize_layer_8cpp_source.xhtml new file mode 100644 index 0000000000..177c5cad76 --- /dev/null +++ b/22.05.01/_quantize_layer_8cpp_source.xhtml @@ -0,0 +1,151 @@ + + + + + + + + + + + + + +ArmNN: src/armnn/layers/QuantizeLayer.cpp Source File + + + + + + + + + + + + + + + + +
+
+ + + + ArmNN + + + +
+
+  22.05.01 +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
QuantizeLayer.cpp
+
+
+Go to the documentation of this file.
1 //
2 // Copyright © 2017 Arm Ltd and Contributors. All rights reserved.
3 // SPDX-License-Identifier: MIT
4 //
5 
6 #include "QuantizeLayer.hpp"
7 
8 #include "LayerCloneBase.hpp"
9 
10 #include <armnn/ILayerVisitor.hpp>
11 
12 namespace armnn
13 {
14 
16 : Layer(1, 1, LayerType::Quantize, name)
17 {}
18 
19 std::unique_ptr<IWorkload> QuantizeLayer::CreateWorkload(const IWorkloadFactory& factory) const
20 {
21  QuantizeQueueDescriptor descriptor;
22  SetAdditionalInfo(descriptor);
23 
24  WorkloadInfo info = PrepInfoAndDesc(descriptor);
25 
26  return factory.CreateWorkload(LayerType::Quantize, descriptor, info);
27 }
28 
30 {
31  QuantizeLayer* clone = CloneBase<QuantizeLayer>(graph, GetName());
32  return clone;
33 }
34 
36 {
38 
39  const TensorShape& outputShape = GetOutputSlot(0).GetTensorInfo().GetShape();
40 
42 
43  auto inferredShapes = InferOutputShapes({ GetInputSlot(0).GetConnection()->GetTensorInfo().GetShape() });
44 
45  ValidateAndCopyShape(outputShape, inferredShapes[0], m_ShapeInferenceMethod, "QuantizeLayer");
46 }
47 
49 void QuantizeLayer::Accept(ILayerVisitor& visitor) const
50 {
51  visitor.VisitQuantizeLayer(this, GetName());
52 }
54 
55 } //namespace armnn
+
const TensorShape & GetShape() const
Definition: Tensor.hpp:191
+
std::vector< TensorShape > InferOutputShapes(const std::vector< TensorShape > &inputShapes) const override
Infer the shape of the output(s) based on the provided input shape(s)
Definition: Layer.cpp:397
+
#define ARMNN_NO_DEPRECATE_WARN_BEGIN
Definition: Deprecated.hpp:33
+ +
virtual std::unique_ptr< IWorkload > CreateWorkload(const IWorkloadFactory &factory) const override
+
void VerifyShapeInferenceType(const TensorShape &outputShape, ShapeInferenceMethod shapeInferenceMethod)
Definition: Layer.cpp:491
+
Copyright (c) 2021 ARM Limited and Contributors.
+ +
const IOutputSlot * GetConnection() const override
Definition: Layer.hpp:204
+
void ValidateAndCopyShape(const TensorShape &outputShape, const TensorShape &inferredShape, const ShapeInferenceMethod shapeInferenceMethod, const std::string &layerName, const unsigned int outputSlotIndex=0)
Definition: Layer.cpp:422
+ + +
void VerifyLayerConnections(unsigned int expectedConnections, const CheckLocation &location) const
Definition: Layer.cpp:378
+
const InputSlot & GetInputSlot(unsigned int index) const override
Get a const input slot handle by slot index.
Definition: Layer.hpp:322
+
QuantizeLayer(const char *name)
+
#define ARMNN_NO_DEPRECATE_WARN_END
Definition: Deprecated.hpp:34
+ +
WorkloadInfo PrepInfoAndDesc(QueueDescriptor &descriptor) const
Helper function to reduce duplication in *LayerCreateWorkload.
Definition: Layer.hpp:394
+
Layer * Clone(Graph &graph) const override
Creates a dynamically-allocated copy of this layer.
+
QuantizedType Quantize(float value, float scale, int32_t offset)
Quantize a floating point data type into an 8-bit data type.
Definition: TypesUtils.cpp:30
+
#define CHECK_LOCATION()
Definition: Exceptions.hpp:203
+ +
void SetAdditionalInfo(QueueDescriptor &descriptor) const
Definition: Layer.cpp:274
+ +
void ValidateTensorShapesFromInputs() override
+ +
ARMNN_NO_DEPRECATE_WARN_BEGIN void Accept(ILayerVisitor &visitor) const override
+
const OutputSlot & GetOutputSlot(unsigned int index=0) const override
Get the const output slot handle by slot index.
Definition: Layer.hpp:324
+
virtual const TensorInfo & GetTensorInfo() const =0
+
Contains information about TensorInfos of a layer.
+
const char * GetName() const override
Returns the name of the layer.
Definition: Layer.hpp:317
+
virtual std::unique_ptr< IWorkload > CreateWorkload(LayerType type, const QueueDescriptor &descriptor, const WorkloadInfo &info) const
+
const TensorInfo & GetTensorInfo() const override
Definition: Layer.cpp:92
+
ShapeInferenceMethod m_ShapeInferenceMethod
Definition: Layer.hpp:421
+ + +
LayerType
When adding a new layer, adapt also the LastLayer enum value in the enum class LayerType below...
Definition: Types.hpp:467
+
+
+ + + + -- cgit v1.2.1