diff options
author | Matthew Sloyan <matthew.sloyan@arm.com> | 2021-08-12 17:41:04 +0100 |
---|---|---|
committer | Matthew Sloyan <matthew.sloyan@arm.com> | 2021-08-16 17:06:43 +0100 |
commit | 57d2c7ebc214c22098172fdd8b77940956bcbaf8 (patch) | |
tree | 5ebf91cce39d0987fd547939f61a2e4e4837c176 /include/armnn | |
parent | 9db96e007d83671046fe5ca1fd6f5233526992d7 (diff) | |
download | armnn-57d2c7ebc214c22098172fdd8b77940956bcbaf8.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/armnn')
-rw-r--r-- | include/armnn/INetwork.hpp | 18 |
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); |