From 98f3afb890f1bddf4798e59e4ef95098f44521f4 Mon Sep 17 00:00:00 2001 From: Matthew Sloyan Date: Thu, 12 Aug 2021 17:41:04 +0100 Subject: IVGCVSW-5924 Update 21.08 Doxygen Documents * Added ConstantTensorAsInput note to AddFullyConnectedLayer description. Signed-off-by: Matthew Sloyan Change-Id: I1f901023b5e421ca14183dd735996c1fe5ddb3d9 --- docs/Doxyfile | 2 +- include/armnn/INetwork.hpp | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/docs/Doxyfile b/docs/Doxyfile index 6516f0fde5..16510041cf 100644 --- a/docs/Doxyfile +++ b/docs/Doxyfile @@ -61,7 +61,7 @@ PROJECT_NAME = "ArmNN" # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = 21.05 +PROJECT_NUMBER = 21.08 # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a 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); -- cgit v1.2.1