From a42f55f4184cb63c73b74ed76759bdcbb18656e8 Mon Sep 17 00:00:00 2001 From: Michele Di Giorgio Date: Fri, 8 Mar 2019 14:52:17 +0000 Subject: COMPMID-1995: Allow weights and bias to be passed as SubStream in FullyConnectedLayer Change-Id: Iae2e7d55fd66d5932c29f78ef3112289d9b69b84 Signed-off-by: Michele Di Giorgio Reviewed-on: https://review.mlplatform.org/c/848 Tested-by: Arm Jenkins Reviewed-by: Pablo Marquez Reviewed-by: Georgios Pinitas --- arm_compute/graph/GraphBuilder.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'arm_compute/graph/GraphBuilder.h') diff --git a/arm_compute/graph/GraphBuilder.h b/arm_compute/graph/GraphBuilder.h index 1296f56482..a2a938b1cc 100644 --- a/arm_compute/graph/GraphBuilder.h +++ b/arm_compute/graph/GraphBuilder.h @@ -234,6 +234,23 @@ public: * @return Node ID of the created node, EmptyNodeID in case of error */ static NodeID add_flatten_node(Graph &g, NodeParams params, NodeIdxPair input); + /** Adds a fully connected layer node to the graph + * + * @param[in] g Graph to add the layer to + * @param[in] params Common node parameters + * @param[in] input Input to the fully connected layer node as a NodeID-Index pair + * @param[in] num_outputs Number of output neurons + * @param[in] weights_nid Node ID of the weights node data + * @param[in] bias_nid (Optional) Node ID of the bias node data. Defaults to EmptyNodeID + * @param[in] fc_info (Optional) Fully connected layer metadata + * @param[in] out_quant_info (Optional) Output quantization info + * + * @return Node ID of the created node, EmptyNodeID in case of error + */ + static NodeID add_fully_connected_layer(Graph &g, NodeParams params, NodeIdxPair input, unsigned int num_outputs, + NodeID weights_nid, NodeID bias_nid = EmptyNodeID, + const FullyConnectedLayerInfo fc_info = FullyConnectedLayerInfo(), + const QuantizationInfo out_quant_info = QuantizationInfo()); /** Adds a fully connected layer node to the graph * * @param[in] g Graph to add the layer to -- cgit v1.2.1