aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMatthew Sloyan <matthew.sloyan@arm.com>2021-08-12 17:41:04 +0100
committerMatthew Sloyan <matthew.sloyan@arm.com>2021-08-16 20:31:14 +0100
commit98f3afb890f1bddf4798e59e4ef95098f44521f4 (patch)
tree5ebf91cce39d0987fd547939f61a2e4e4837c176 /include
parent2332e458e43a7f8821ca66c1a31c6430cbf8fdba (diff)
downloadarmnn-98f3afb890f1bddf4798e59e4ef95098f44521f4.tar.gz
IVGCVSW-5924 Update 21.08 Doxygen Documents
* Added ConstantTensorAsInput note to AddFullyConnectedLayer description. Signed-off-by: Matthew Sloyan <matthew.sloyan@arm.com> Change-Id: I1f901023b5e421ca14183dd735996c1fe5ddb3d9
Diffstat (limited to 'include')
-rw-r--r--include/armnn/INetwork.hpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/include/armnn/INetwork.hpp b/include/armnn/INetwork.hpp
index 48f407f2f9..3bbc406bff 100644
--- a/include/armnn/INetwork.hpp
+++ b/include/armnn/INetwork.hpp
@@ -305,6 +305,24 @@ public:
/// Adds a fully connected layer to the network.
/// @param fullyConnectedDescriptor - Description of the fully connected layer.
/// @return - Interface for configuring the layer.
+ ///
+ /// @note Weights and biases are passed in as inputs. If they are constant tensors you can simply store
+ /// them in a ConstantLayer as seen below. A full example can be found in samples/SimpleSample.cpp.
+ ///
+ /// @code
+ /// // Make sure the IsConstant flag is set on the weightsInfo before passing it to the ConstTensor.
+ /// ConstTensor weights(weightsInfo, weightsData);
+ ///
+ /// // Constant layer that now holds weights data for FullyConnected
+ /// IConnectableLayer* const constantWeightsLayer = myNetwork->AddConstantLayer(weights, "weights");
+ ///
+ /// FullyConnectedDescriptor fullyConnectedDesc;
+ /// IConnectableLayer* const fullyConnectedLayer = myNetwork->AddFullyConnectedLayer(fullyConnectedDesc,
+ /// "fully connected");
+ /// IConnectableLayer* InputLayer = myNetwork->AddInputLayer(0);
+ /// InputLayer->GetOutputSlot(0).Connect(fullyConnectedLayer->GetInputSlot(0));
+ /// constantWeightsLayer->GetOutputSlot(0).Connect(fullyConnectedLayer->GetInputSlot(1));
+ /// @endcode
IConnectableLayer* AddFullyConnectedLayer(const FullyConnectedDescriptor& fullyConnectedDescriptor,
const char* name = nullptr);