Skip to content

Commit

Permalink
IVGCVSW-8261 Ensure PyArmNN has been updated with new features added …
Browse files Browse the repository at this point in the history
…in ArmNN

* Add layers missing in PyArmNN

Signed-off-by: Nikhil Raj <[email protected]>
Change-Id: Ia821105f9d235dcf7f9472e54849d268e07fb9a9
  • Loading branch information
nikraj01 committed May 15, 2024
1 parent 1999dac commit 1f3eb73
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 0 deletions.
42 changes: 42 additions & 0 deletions python/pyarmnn/src/pyarmnn/swig/modules/armnn_network.i
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand All @@ -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.
Expand Down
3 changes: 3 additions & 0 deletions python/pyarmnn/test/test_network.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@ def test_serialize_to_dot_mode_readonly(network_file, get_runtime, tmpdir):
'AddBatchMatMulLayer',
'AddBatchNormalizationLayer',
'AddBatchToSpaceNdLayer',
'AddBroadcastToLayer',
'AddCastLayer',
'AddChannelShuffleLayer',
'AddComparisonLayer',
Expand All @@ -210,6 +211,7 @@ def test_serialize_to_dot_mode_readonly(network_file, get_runtime, tmpdir):
'AddFloorLayer',
'AddFillLayer',
'AddFullyConnectedLayer',
'AddFusedLayer',
'AddGatherLayer',
'AddGatherNdLayer',
'AddInputLayer',
Expand Down Expand Up @@ -237,6 +239,7 @@ def test_serialize_to_dot_mode_readonly(network_file, get_runtime, tmpdir):
'AddReshapeLayer',
'AddResizeLayer',
'AddReverseV2Layer',
'AddScatterNdLayer',
'AddShapeLayer',
'AddSliceLayer',
'AddSoftmaxLayer',
Expand Down

0 comments on commit 1f3eb73

Please sign in to comment.