| 96 | } |
| 97 | |
| 98 | TensorDescriptor ConcatenateLayerNode::configure_output(size_t idx) const |
| 99 | { |
| 100 | ARM_COMPUTE_UNUSED(idx); |
| 101 | ARM_COMPUTE_ERROR_ON(idx >= _outputs.size()); |
| 102 | |
| 103 | // Check if all input tensors are set |
| 104 | bool are_all_inputs_set = std::all_of(std::begin(_input_edges), std::end(_input_edges), |
| 105 | [](const EdgeID &eid) { return eid != EmptyEdgeID; }); |
| 106 | |
| 107 | TensorDescriptor output_info = {}; |
| 108 | |
| 109 | if (are_all_inputs_set) |
| 110 | { |
| 111 | std::vector<TensorDescriptor> inputs_descriptors; |
| 112 | for (unsigned int i = 0; i < _input_edges.size(); ++i) |
| 113 | { |
| 114 | const Tensor *t = _graph->tensor(input_id(i)); |
| 115 | ARM_COMPUTE_ERROR_ON(t == nullptr); |
| 116 | inputs_descriptors.push_back(t->desc()); |
| 117 | } |
| 118 | output_info = compute_output_descriptor(inputs_descriptors, _concat_descriptor.axis); |
| 119 | if (!_concat_descriptor.output_qinfo.empty()) |
| 120 | { |
| 121 | output_info.quant_info = _concat_descriptor.output_qinfo; |
| 122 | } |
| 123 | } |
| 124 | |
| 125 | return output_info; |
| 126 | } |
| 127 | |
| 128 | NodeType ConcatenateLayerNode::type() const |
| 129 | { |