aboutsummaryrefslogtreecommitdiff
path: root/python/pyarmnn/src/pyarmnn/swig/modules/armnn_network.i
diff options
context:
space:
mode:
authorJan Eilers <jan.eilers@arm.com>2020-08-12 14:59:06 +0100
committerTeresaARM <teresa.charlinreyes@arm.com>2020-08-17 16:10:54 +0000
commit841aca155b35cc17ea9527599d2c364695e28166 (patch)
tree8861d6f275f5955495201f0e1b0677bb44604a17 /python/pyarmnn/src/pyarmnn/swig/modules/armnn_network.i
parent313c99f9a64c7fc51dc70757bffff3088c2e95cf (diff)
downloadarmnn-841aca155b35cc17ea9527599d2c364695e28166.tar.gz
IVGCVSW-5200 Update pyarmnn
* Add HalfPixelCenters to Resize * Update pyarmnn version to semantic versioning * Add fill operator * Add Bf16 optimization * Add Gather operator * Update TransposeConvolution2d descriptor * Add Rank operator * Add load dynamic tensor support of TfLiteParser Signed-off-by: Jan Eilers <jan.eilers@arm.com> Change-Id: I7e76ed286ab87bd97a65ff62868ba7db7967376f
Diffstat (limited to 'python/pyarmnn/src/pyarmnn/swig/modules/armnn_network.i')
-rw-r--r--python/pyarmnn/src/pyarmnn/swig/modules/armnn_network.i58
1 files changed, 47 insertions, 11 deletions
diff --git a/python/pyarmnn/src/pyarmnn/swig/modules/armnn_network.i b/python/pyarmnn/src/pyarmnn/swig/modules/armnn_network.i
index b065331992..4665e6087e 100644
--- a/python/pyarmnn/src/pyarmnn/swig/modules/armnn_network.i
+++ b/python/pyarmnn/src/pyarmnn/swig/modules/armnn_network.i
@@ -20,15 +20,21 @@ Struct for holding options relating to the Arm NN optimizer. See `Optimize`.
Contains:
m_debug (bool): Add debug data for easier troubleshooting.
- m_ReduceFp32ToFp16 (bool): Reduce Fp32 data to Fp16 for faster processing.
+ m_ReduceFp32ToBf16 (bool): Reduces Fp32 network to BFloat16 (Bf16) for faster processing. Layers
+ that can not be reduced will be left in Fp32.
+ m_ReduceFp32ToFp16 (bool): Reduces Fp32 network to Fp16 for faster processing. Layers
+ that can not be reduced will be left in Fp32.
") OptimizerOptions;
struct OptimizerOptions
{
OptimizerOptions();
- OptimizerOptions(bool reduceFp32ToFp16, bool debug);
+ OptimizerOptions(bool reduceFp32ToFp16,
+ bool debug,
+ bool reduceFp32ToBf16 = false);
+ bool m_ReduceFp32ToBf16;
bool m_ReduceFp32ToFp16;
bool m_Debug;
};
@@ -501,21 +507,35 @@ public:
armnn::IConnectableLayer* AddDivisionLayer(const char* name = nullptr);
%feature("docstring",
- "
- Adds an Elementwise Unary layer to the network. Type of unary operation to use is decided by elementwiseUnaryDescriptor. Unary operations supported are (Abs, Exp, Neg, Rsqrt, Sqrt)
+ "
+ Adds an Elementwise Unary layer to the network. Type of unary operation to use is decided by elementwiseUnaryDescriptor. Unary operations supported are (Abs, Exp, Neg, Rsqrt, Sqrt)
- Args:
- elementwiseUnaryDescriptor (ElementwiseUnaryDescriptor): ElementwiseUnaryDescriptor to configure the choice of unary operation added to the network.
- name (str): Optional name for the layer.
+ Args:
+ elementwiseUnaryDescriptor (ElementwiseUnaryDescriptor): ElementwiseUnaryDescriptor to configure the choice of unary operation added to the network.
+ name (str): Optional name for the layer.
- Returns:
- IConnectableLayer: Interface for configuring the layer.
- ") AddElementwiseUnaryLayer;
+ Returns:
+ IConnectableLayer: Interface for configuring the layer.
+ ") AddElementwiseUnaryLayer;
armnn::IConnectableLayer* AddElementwiseUnaryLayer(const ElementwiseUnaryDescriptor& elementwiseUnaryDescriptor,
const char* name = nullptr);
%feature("docstring",
"
+ Add a Fill layer to the network.
+
+ Args:
+ FillDescriptor (FillDescriptor): Descriptor for the fill operation.
+ name (str): Optional name for the layer.
+
+ Returns:
+ IConnectableLayer: Interface for configuring the layer.
+ ") AddFillLayer;
+ armnn::IConnectableLayer* AddFillLayer(const FillDescriptor& fillDescriptor,
+ const char* name = nullptr);
+
+ %feature("docstring",
+ "
Adds a Floor layer to the network.
Args:
@@ -531,12 +551,14 @@ public:
Add Gather layer to the network.
Args:
+ descriptor (GatherDescriptor): Descriptor for the gather operation.
name (str): Optional name for the layer.
Returns:
IConnectableLayer: Interface for configuring the layer.
") AddGatherLayer;
- armnn::IConnectableLayer* AddGatherLayer(const char* name = nullptr);
+ armnn::IConnectableLayer* AddGatherLayer(const GatherDescriptor& descriptor,
+ const char* name = nullptr);
%feature("docstring",
"
@@ -752,6 +774,20 @@ public:
armnn::IConnectableLayer* AddQuantizedLstmLayer(const armnn::QuantizedLstmInputParams& params,
const char* name = nullptr);
+
+ %feature("docstring",
+ "
+ Adds a Rank layer to the network.
+
+ Args:
+ name (str): Optional name for the layer.
+
+ Returns:
+ IConnectableLayer: Interface for configuring the layer.
+ ") AddRankLayer;
+ armnn::IConnectableLayer* AddRankLayer(const char* name = nullptr);
+
+
%feature("docstring",
"
Adds a Reshape layer to the network.