From d7f483fcb1e5b07a7a59a3fad7be07c78a3abc37 Mon Sep 17 00:00:00 2001 From: Nikhil Raj Date: Tue, 14 May 2024 14:16:40 +0100 Subject: IVGCVSW-8261 Ensure PyArmNN has been updated with new features added in ArmNN * Add layers missing in PyArmNN Signed-off-by: Nikhil Raj Change-Id: Ia821105f9d235dcf7f9472e54849d268e07fb9a9 --- .../src/pyarmnn/swig/modules/armnn_network.i | 42 ++++++++++++++++++++++ python/pyarmnn/test/test_network.py | 3 ++ 2 files changed, 45 insertions(+) (limited to 'python/pyarmnn') diff --git a/python/pyarmnn/src/pyarmnn/swig/modules/armnn_network.i b/python/pyarmnn/src/pyarmnn/swig/modules/armnn_network.i index 0b7f55d1cc..bfaa55919b 100644 --- a/python/pyarmnn/src/pyarmnn/swig/modules/armnn_network.i +++ b/python/pyarmnn/src/pyarmnn/swig/modules/armnn_network.i @@ -596,6 +596,20 @@ public: const char* name = nullptr); + %feature("docstring", + " + Adds a Broadcast_To layer to the network. + + Args: + broadcastToDescriptor (BroadcastToDescriptor): Descriptor for the explicit broadcat operation. + name (str): Optional name for the layer. + + Returns: + IConnectableLayer: Interface for configuring the layer. + ") AddBroadcastToLayer; + armnn::IConnectableLayer* AddBroadcastToLayer(const armnn::BroadcastToDescriptor& broadcastToDescriptor, + const char* name = nullptr); + %feature("docstring", " Adds a Division layer to the network. @@ -1147,6 +1161,20 @@ public: armnn::IConnectableLayer* AddFullyConnectedLayer(const armnn::FullyConnectedDescriptor& fullyConnectedDescriptor, const char* name = nullptr); + %feature("docstring", + " + Adds a Fused layer to the network. This is a precompiled layer for fused operator that merges Add + Mul + Add. + + Args: + fusedDescriptor (FusedDescriptor): Description of the fused layer. + name (str): Optional name for the layer. + + Returns: + IConnectableLayer: Interface for configuring the layer. + ") AddFusedLayer; + armnn::IConnectableLayer* AddFusedLayer(const armnn::FusedDescriptor& fusedDescriptor, + const char* name = nullptr); + %feature("docstring", " Adds a LogicalBinary layer to the network. @@ -1161,6 +1189,20 @@ public: armnn::IConnectableLayer* AddLogicalBinaryLayer(const armnn::LogicalBinaryDescriptor& logicalBinaryDescriptor, const char* name = nullptr); + %feature("docstring", + " + Adds a ScatterND layer to the network. + + Args: + scatterndDescriptor (ScatterNdDescriptor): Description of the tile layer. + name (str): Optional name for the layer. + + Returns: + IConnectableLayer: Interface for configuring the layer. + ") AddScatterNdLayer; + armnn::IConnectableLayer* AddScatterNdLayer(const armnn::ScatterNdDescriptor& scatterndDescriptor, + const char* name = nullptr); + %feature("docstring", " Adds a Tile layer to the network. diff --git a/python/pyarmnn/test/test_network.py b/python/pyarmnn/test/test_network.py index 91602b8fa8..933828329b 100644 --- a/python/pyarmnn/test/test_network.py +++ b/python/pyarmnn/test/test_network.py @@ -193,6 +193,7 @@ def test_serialize_to_dot_mode_readonly(network_file, get_runtime, tmpdir): 'AddBatchMatMulLayer', 'AddBatchNormalizationLayer', 'AddBatchToSpaceNdLayer', + 'AddBroadcastToLayer', 'AddCastLayer', 'AddChannelShuffleLayer', 'AddComparisonLayer', @@ -210,6 +211,7 @@ def test_serialize_to_dot_mode_readonly(network_file, get_runtime, tmpdir): 'AddFloorLayer', 'AddFillLayer', 'AddFullyConnectedLayer', + 'AddFusedLayer', 'AddGatherLayer', 'AddGatherNdLayer', 'AddInputLayer', @@ -237,6 +239,7 @@ def test_serialize_to_dot_mode_readonly(network_file, get_runtime, tmpdir): 'AddReshapeLayer', 'AddResizeLayer', 'AddReverseV2Layer', + 'AddScatterNdLayer', 'AddShapeLayer', 'AddSliceLayer', 'AddSoftmaxLayer', -- cgit v1.2.1