| 525 | } |
| 526 | |
| 527 | NodeID GraphBuilder::add_fully_connected_layer(Graph &g, |
| 528 | NodeParams params, |
| 529 | NodeIdxPair input, |
| 530 | unsigned int num_outputs, |
| 531 | NodeID weights_nid, |
| 532 | NodeID bias_nid, |
| 533 | const FullyConnectedLayerInfo fc_info, |
| 534 | const QuantizationInfo &out_quant_info, |
| 535 | FastMathHint fast_math_hint) |
| 536 | { |
| 537 | check_nodeidx_pair(input, g); |
| 538 | ARM_COMPUTE_ERROR_ON(num_outputs == 0); |
| 539 | ARM_COMPUTE_ERROR_ON(weights_nid == EmptyNodeID); |
| 540 | |
| 541 | const bool has_bias = (bias_nid != EmptyNodeID); |
| 542 | |
| 543 | // Get input tensor descriptor |
| 544 | const TensorDescriptor input_tensor_desc = get_tensor_descriptor(g, g.node(input.node_id)->outputs()[0]); |
| 545 | |
| 546 | // Create fully connected node and connect |
| 547 | NodeID fc_nid = g.add_node<FullyConnectedLayerNode>(num_outputs, out_quant_info, fc_info, fast_math_hint); |
| 548 | g.add_connection(input.node_id, input.index, fc_nid, 0); |
| 549 | g.add_connection(weights_nid, 0, fc_nid, 1); |
| 550 | if (has_bias) |
| 551 | { |
| 552 | g.add_connection(bias_nid, 0, fc_nid, 2); |
| 553 | } |
| 554 | |
| 555 | set_node_params(g, fc_nid, params); |
| 556 | |
| 557 | return fc_nid; |
| 558 | } |
| 559 | |
| 560 | NodeID GraphBuilder::add_fully_connected_layer(Graph &g, |
| 561 | NodeParams params, |
nothing calls this directly
no test coverage detected