Compute Library
 23.11
ValidateHelpers.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2018-2021, 2023 Arm Limited.
3  *
4  * SPDX-License-Identifier: MIT
5  *
6  * Permission is hereby granted, free of charge, to any person obtaining a copy
7  * of this software and associated documentation files (the "Software"), to
8  * deal in the Software without restriction, including without limitation the
9  * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
10  * sell copies of the Software, and to permit persons to whom the Software is
11  * furnished to do so, subject to the following conditions:
12  *
13  * The above copyright notice and this permission notice shall be included in all
14  * copies or substantial portions of the Software.
15  *
16  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22  * SOFTWARE.
23  */
24 #ifndef ACL_ARM_COMPUTE_GRAPH_BACKENDS_VALIDATEHELPERS_H
25 #define ACL_ARM_COMPUTE_GRAPH_BACKENDS_VALIDATEHELPERS_H
26 
27 #include "arm_compute/core/Error.h"
34 
35 namespace arm_compute
36 {
37 namespace graph
38 {
39 namespace backends
40 {
41 namespace detail
42 {
43 /** Returns backing tensor info of a given tensor
44  *
45  * @param[in] tensor Tensor to extract the backing tensor from
46  *
47  * @return Backing tensor tensor info if present else nullptr
48  */
50 {
51  return ((tensor == nullptr) || (tensor->handle() == nullptr)) ? nullptr : tensor->handle()->tensor().info();
52 }
53 
54 /** Validates a ArgMinMax layer node
55  *
56  * @tparam ArgMinMax layer function type
57  *
58  * @param[in] node Node to validate
59  *
60  * @return Status
61  */
62 template <typename ArgMinMaxLayer>
64 {
66  "Validating ArgMinMaxLayer node with ID : " << node.id() << " and Name: " << node.name() << std::endl);
69 
70  // Extract IO and info
73 
74  // Validate function
75  return ArgMinMaxLayer::validate(input, node.axis(), output, node.reduction_operation());
76 }
77 
78 /** Validates a Bounding Box Transform layer node
79  *
80  * @tparam BoundingBoxTransformLayer Bounding Box Transform layer function type
81  *
82  * @param[in] node Node to validate
83  *
84  * @return Status
85  */
86 template <typename BoundingBoxTransformLayer>
88 {
89  ARM_COMPUTE_LOG_GRAPH_VERBOSE("Validating BoundingBoxTransformLayer node with ID : " << node.id() << " and Name: "
90  << node.name() << std::endl);
93 
94  // Extract IO and info
98  const BoundingBoxTransformInfo bbox_info = node.info();
99 
100  return BoundingBoxTransformLayer::validate(input, output, deltas, bbox_info);
101 }
102 
103 /** Validates a Channel Shuffle layer node
104  *
105  * @tparam ChannelShuffleLayer Channel Shuffle layer function type
106  *
107  * @param[in] node Node to validate
108  *
109  * @return Status
110  */
111 template <typename ChannelShuffleLayer>
113 {
115  "Validating ChannelShuffle node with ID : " << node.id() << " and Name: " << node.name() << std::endl);
118 
119  // Extract IO and info
122  const unsigned int num_groups = node.num_groups();
123 
125 }
126 
127 /** Validates a Convolution layer node
128  *
129  * @tparam ConvolutionLayer Default Convolution layer function type
130  * @tparam DirectConvolutionLayer Direct Convolution layer function type
131  * @tparam GEMMConvolutionLayer GEMM Convolution layer function type
132  * @tparam WinogradConvolutionLayer Winograd Convolution layer function type
133  *
134  * @param[in] node Node to validate
135  *
136  * @return Status
137  */
138 template <typename ConvolutionLayer,
139  typename DirectConvolutionLayer,
140  typename GEMMConvolutionLayer,
141  typename WinogradConvolutionLayer>
143 {
145  "Validating ConvolutionLayer node with ID : " << node.id() << " and Name: " << node.name() << std::endl);
148 
149  // Extract IO and info
154 
155  if (is_data_type_quantized_asymmetric(input->data_type()))
156  {
157  biases->set_data_type(DataType::S32);
158  }
159 
161  const ConvolutionMethod conv_algorithm = node.convolution_method();
162  const bool fast_math = node.fast_math_hint() == FastMathHint::Enabled;
163  const unsigned int num_groups = node.num_groups();
164 
165  // Validate function
166  Status status{};
167  switch (conv_algorithm)
168  {
170  ARM_COMPUTE_RETURN_ERROR_ON_MSG(num_groups != 1, "DirectConvolutionLayer does not support grouping!");
171  status = DirectConvolutionLayer::validate(input, weights, biases, output, conv_info);
172  break;
174  status = GEMMConvolutionLayer::validate(input, weights, biases, output, conv_info, WeightsInfo(),
176  break;
178  ARM_COMPUTE_RETURN_ERROR_ON_MSG(num_groups != 1, "WinogradConvolutionLayer does not support grouping!");
179  status = WinogradConvolutionLayer::validate(input, weights, biases, output, conv_info,
180  ActivationLayerInfo(), fast_math);
181  break;
183  status = ConvolutionLayer::validate(input, weights, biases, output, conv_info, WeightsInfo(), Size2D(1, 1),
184  ActivationLayerInfo(), fast_math, num_groups);
185  break;
186  default:
187  ARM_COMPUTE_RETURN_ERROR_MSG("Unsupported convolution method");
188  }
189 
190  return status;
191 }
192 
193 /** Validates a Depthwise Convolution layer node
194  *
195  * @tparam DepthwiseConvolutionLayer Default Depthwise Convolution layer type
196  *
197  * @param[in] node Node to validate
198  *
199  * @return Status
200  */
201 template <typename DepthwiseConvolutionLayer>
203 {
204  ARM_COMPUTE_LOG_GRAPH_VERBOSE("Validating DepthwiseConvolutionLayer node with ID : " << node.id() << " and Name: "
205  << node.name() << std::endl);
208 
209  // Extract IO and info
214 
216  const DepthwiseConvolutionMethod dwc_algorithm = node.depthwise_convolution_method();
217  const int depth_multiplier = node.depth_multiplier();
218 
219  // Validate function
220  Status status{};
221  switch (dwc_algorithm)
222  {
225  status = DepthwiseConvolutionLayer::validate(input, weights, biases, output, conv_info, depth_multiplier);
226  break;
227  default:
228  ARM_COMPUTE_RETURN_ERROR_MSG("Unsupported depthwise convolution method");
229  }
230 
231  return status;
232 }
233 /** Validates a depth to space layer node
234  *
235  * @tparam DequantizationLayer Dequantize layer type
236  *
237  * @param[in] node Node to validate
238  *
239  * @return Status
240  */
241 template <typename DepthToSpaceLayer>
243 {
245  "Validating DetectionOutputLayer node with ID : " << node.id() << " and Name: " << node.name() << std::endl);
248 
249  // Extract IO and info
252 
253  return DepthToSpaceLayer::validate(input, output, node.block_shape());
254 }
255 /** Validates a dequantize layer node
256  *
257  * @tparam DequantizationLayer Dequantize layer type
258  *
259  * @param[in] node Node to validate
260  *
261  * @return Status
262  */
263 template <typename DequantizationLayer>
265 {
267  "Validating DetectionOutputLayer node with ID : " << node.id() << " and Name: " << node.name() << std::endl);
270 
271  // Extract IO and info
274 
275  return DequantizationLayer::validate(input, output);
276 }
277 /** Validates a detection output layer node
278  *
279  * @tparam DetectionOutputLayer DetectionOutput layer type
280  *
281  * @param[in] node Node to validate
282  *
283  * @return Status
284  */
285 template <typename DetectionOutputLayer>
287 {
289  "Validating DetectionOutputLayer node with ID : " << node.id() << " and Name: " << node.name() << std::endl);
292 
293  // Extract IO and info
298  const DetectionOutputLayerInfo detect_info = node.detection_output_info();
299 
300  return DetectionOutputLayer::validate(input0, input1, input2, output, detect_info);
301 }
302 /** Validates a detection post process layer node
303  *
304  * @tparam DetectionPostProcessLayer DetectionOutput layer type
305  *
306  * @param[in] node Node to validate
307  *
308  * @return Status
309  */
310 template <typename DetectionPostProcessLayer>
312 {
313  ARM_COMPUTE_LOG_GRAPH_VERBOSE("Validating DetectionPostProcessLayer node with ID : " << node.id() << " and Name: "
314  << node.name() << std::endl);
317 
318  // Extract IO and info
327 
328  return DetectionPostProcessLayer::validate(input0, input1, input2, output0, output1, output2, output3, detect_info);
329 }
330 
331 /** Validates a Generate Proposals layer node
332  *
333  * @tparam GenerateProposalsLayer Generate Proposals layer type
334  *
335  * @param[in] node Node to validate
336  *
337  * @return Status
338  */
339 template <typename GenerateProposalsLayer>
341 {
343  "Validating GenerateProposalsLayer node with ID : " << node.id() << " and Name: " << node.name() << std::endl);
346 
347  // Extract IO and info
353  arm_compute::ITensorInfo *num_valid_proposals = get_backing_tensor_info(node.output(2));
354  const GenerateProposalsInfo info = node.info();
355 
356  return GenerateProposalsLayer::validate(scores, deltas, anchors, proposals, scores_out, num_valid_proposals, info);
357 }
358 
359 /** Validates a L2Normalization layer node
360  *
361  * @tparam L2Normalization layer type
362  *
363  * @param[in] node Node to validate
364  *
365  * @return Status
366  */
367 template <typename L2NormalizeLayer>
369 {
371  "Validating L2NormalizeLayerNode node with ID : " << node.id() << " and Name: " << node.name() << std::endl);
374 
375  // Extract IO and info
378  int axis = node.axis();
379  float epsilon = node.epsilon();
380 
381  // Validate function
382  return L2NormalizeLayer::validate(input, output, axis, epsilon);
383 }
384 
385 /** Validates a NormalizePlanarYUV layer node
386  *
387  * @tparam NormalizePlanarYUVLayer layer type
388  *
389  * @param[in] node Node to validate
390  *
391  * @return Status
392  */
393 template <typename NormalizePlanarYUVLayer>
395 {
397  "Validating NormalizePlanarYUVLayer node with ID : " << node.id() << " and Name: " << node.name() << std::endl);
400 
401  // Extract IO and info
406 
407  // Validate function
408  return NormalizePlanarYUVLayer::validate(input, output, mean, std);
409 }
410 
411 /** Validates a pad layer node
412  *
413  * @tparam PadLayer Pad layer type
414  *
415  * @param[in] node Node to validate
416  *
417  * @return Status
418  */
419 template <typename PadLayer>
421 {
422  ARM_COMPUTE_LOG_GRAPH_VERBOSE("Validating PadLayer node with ID : " << node.id() << " and Name: " << node.name()
423  << std::endl);
426 
427  // Extract IO and info
430  const PaddingList &padding = node.padding();
431 
432  return PadLayer::validate(input, output, padding);
433 }
434 
435 /** Validates a permute layer node
436  *
437  * @tparam PermuteLayer Permute layer type
438  *
439  * @param[in] node Node to validate
440  *
441  * @return Status
442  */
443 template <typename PermuteLayer>
445 {
446  ARM_COMPUTE_LOG_GRAPH_VERBOSE("Validating PermuteLayer node with ID : " << node.id() << " and Name: " << node.name()
447  << std::endl);
450 
451  // Extract IO and info
454  const PermutationVector &perm = node.permutation_vector();
455 
456  return PermuteLayer::validate(input, output, perm);
457 }
458 
459 /** Validates a PRelu layer node
460  *
461  * @tparam PReluLayer PRelu layer type
462  *
463  * @param[in] node Node to validate
464  *
465  * @return Status
466  */
467 template <typename PReluLayer>
469 {
470  ARM_COMPUTE_LOG_GRAPH_VERBOSE("Validating PRelu node with ID : " << node.id() << " and Name: " << node.name()
471  << std::endl);
474 
475  // Extract IO and info
479 
480  return PReluLayer::validate(input, alpha, output);
481 }
482 
483 /** Validates a priorbox layer node
484  *
485  * @tparam PriorBoxLayer PriorBox layer type
486  *
487  * @param[in] node Node to validate
488  *
489  * @return Status
490  */
491 template <typename PriorBoxLayer>
493 {
495  "Validating PriorBoxLayer node with ID : " << node.id() << " and Name: " << node.name() << std::endl);
498 
499  // Extract IO and info
503  const PriorBoxLayerInfo prior_info = node.priorbox_info();
504 
505  return PriorBoxLayer::validate(input0, input1, output, prior_info);
506 }
507 
508 /** Validates a Quantization layer node
509  *
510  * @tparam QuantizationLayer Quantization layer type
511  *
512  * @param[in] node Node to validate
513  *
514  * @return Status
515  */
516 template <typename QuantizationLayer>
518 {
520  "Validating QuantizationLayer node with ID : " << node.id() << " and Name: " << node.name() << std::endl);
523 
524  // Extract input and output
527 
528  // Validate function
529  return QuantizationLayer::validate(input, output);
530 }
531 
532 /** Validates a Reduction operation layer node
533  *
534  * @tparam ReductionLayer Reduction layer type
535  *
536  * @param[in] node Node to validate
537  *
538  * @return Status
539  */
540 template <typename ReductionLayer>
542 {
544  "Validating ReductionLayer node with ID : " << node.id() << " and Name: " << node.name() << std::endl);
545 
548 
549  // Extract input and output
552 
553  // Validate function
554  return ReductionLayer::validate(input, output, node.axis(), node.op(), node.keep_dims());
555 }
556 
557 /** Validates a Reorg layer node
558  *
559  * @tparam ReorgLayer Reorg layer type
560  *
561  * @param[in] node Node to validate
562  *
563  * @return Status
564  */
565 template <typename ReorgLayer>
567 {
568  ARM_COMPUTE_LOG_GRAPH_VERBOSE("Validating ReorgLayer node with ID : " << node.id() << " and Name: " << node.name()
569  << std::endl);
572 
573  // Extract input and output
576 
577  // Validate function
578  return ReorgLayer::validate(input, output, node.stride());
579 }
580 
581 /** Validates a Reshape layer node
582  *
583  * @tparam ReshapeLayer Reshape layer type
584  *
585  * @param[in] node Node to validate
586  *
587  * @return Status
588  */
589 template <typename ReshapeLayer>
591 {
592  ARM_COMPUTE_LOG_GRAPH_VERBOSE("Validating ReshapeLayer node with ID : " << node.id() << " and Name: " << node.name()
593  << std::endl);
596 
597  // Extract input and output
600 
601  // Validate function
602  return ReshapeLayer::validate(input, output);
603 }
604 
605 /** Validates a ROI Align layer node
606  *
607  * @tparam ROIAlignLayer ROIAlign layer type
608  *
609  * @param[in] node Node to validate
610  *
611  * @return Status
612  */
613 template <typename ROIAlignLayer>
615 {
617  "Validating ROIAlignLayer node with ID : " << node.id() << " and Name: " << node.name() << std::endl);
620 
621  // Extract input and output
625  const ROIPoolingLayerInfo &pool_info = node.pooling_info();
626 
627  // Validate function
628  return ROIAlignLayer::validate(input, rois, output, pool_info);
629 }
630 
631 /** Validates a Slice layer node
632  *
633  * @tparam SliceLayer Slice layer function type
634  *
635  * @param[in] node Node to validate
636  *
637  * @return Status
638  */
639 template <typename SliceLayer>
641 {
642  ARM_COMPUTE_LOG_GRAPH_VERBOSE("Validating Slice node with ID : " << node.id() << " and Name: " << node.name()
643  << std::endl);
646 
647  // Extract IO and info
650  const Coordinates starts = node.starts();
651  const Coordinates ends = node.ends();
652 
653  return SliceLayer::validate(input, output, starts, ends);
654 }
655 
656 /** Validates a Strided Slice layer node
657  *
658  * @tparam StridedSliceLayer Strided Slice layer function type
659  *
660  * @param[in] node Node to validate
661  *
662  * @return Status
663  */
664 template <typename StridedSliceLayer>
666 {
667  ARM_COMPUTE_LOG_GRAPH_VERBOSE("Validating StridedSlice node with ID : " << node.id() << " and Name: " << node.name()
668  << std::endl);
671 
672  // Extract IO and info
675  const Coordinates starts = node.starts();
676  const Coordinates ends = node.ends();
677  const BiStrides strides = node.strides();
679 
680  return StridedSliceLayer::validate(input, output, starts, ends, strides, info.begin_mask(), info.end_mask(),
681  info.shrink_axis_mask());
682 }
683 
684 /** Validates a element-wise layer node
685  *
686  * @param[in] node Node to validate
687  *
688  * @return Status
689  */
690 template <typename EltwiseLayerFunctions>
692 {
693  ARM_COMPUTE_LOG_GRAPH_VERBOSE("Validating EltwiseLayer node with ID : " << node.id() << " and Name: " << node.name()
694  << std::endl);
697 
698  // Extract input and output
702  const EltwiseOperation eltwise_op = node.eltwise_operation();
703  const ConvertPolicy convert_policy = node.convert_policy();
704  const RoundingPolicy round_policy = node.rounding_policy();
706  const QuantizationInfo quant_info = node.output_quant_info();
707 
708  // Validate function
709  if (eltwise_op == EltwiseOperation::Add)
710  {
711  return EltwiseLayerFunctions::ArithmeticAddition::validate(input1, input2, output, convert_policy, act_info);
712  }
713  else if (eltwise_op == EltwiseOperation::Sub)
714  {
715  return EltwiseLayerFunctions::ArithmeticSubtraction::validate(input1, input2, output, convert_policy, act_info);
716  }
717  else if (eltwise_op == EltwiseOperation::Mul)
718  {
719  return EltwiseLayerFunctions::PixelWiseMultiplication::validate(input1, input2, output, 1.0f, convert_policy,
720  round_policy, act_info);
721  }
722  else if (eltwise_op == EltwiseOperation::Max)
723  {
724  return EltwiseLayerFunctions::ElementwiseMax::validate(input1, input2, output, act_info);
725  }
726  else if (eltwise_op == EltwiseOperation::Div)
727  {
728  return EltwiseLayerFunctions::ArithmeticDivision::validate(input1, input2, output, act_info);
729  }
730  else
731  {
732  ARM_COMPUTE_ERROR("Unsupported element-wise operation!");
733  }
734  return Status{};
735 }
736 /** Validates a unary element-wise layer node
737  *
738  * @param[in] node Node to validate
739  *
740  * @return Status
741  */
742 template <typename UnaryEltwiseLayerFunctions>
744 {
745  ARM_COMPUTE_LOG_GRAPH_VERBOSE("Validating EltwiseLayer node with ID : " << node.id() << " and Name: " << node.name()
746  << std::endl);
749 
750  // Extract input and output
753  const UnaryEltwiseOperation eltwise_op = node.eltwise_descriptor().op;
754 
755  // Validate function
756  if (eltwise_op == UnaryEltwiseOperation::Exp)
757  {
759  }
760  else
761  {
762  ARM_COMPUTE_ERROR("Unsupported unary element-wise operation!");
763  }
764 
765  return Status{};
766 }
767 } // namespace detail
768 } // namespace backends
769 } // namespace graph
770 } // namespace arm_compute
771 
772 #endif // ACL_ARM_COMPUTE_GRAPH_BACKENDS_VALIDATEHELPERS_H
arm_compute::graph::ConvolutionMethod::Default
@ Default
Default approach using internal heuristics.
arm_compute::graph::EltwiseOperation::Mul
@ Mul
Arithmetic multiplication.
arm_compute::graph::UnaryEltwiseLayerNode::eltwise_descriptor
descriptors::UnaryEltwiseLayerDescriptor eltwise_descriptor() const
Unary eltwise layer descriptor.
Definition: EltwiseLayerNode.cpp:124
arm_compute::graph::ReorgLayerNode::stride
int stride() const
Stride value to use for reorganizing the values in the output tensor.
Definition: ReorgLayerNode.cpp:40
arm_compute::WeightsInfo
Convolution Layer Weights Information class.
Definition: Types.h:1670
arm_compute::graph::backends::detail::validate_unary_eltwise_layer
Status validate_unary_eltwise_layer(UnaryEltwiseLayerNode &node)
Validates a unary element-wise layer node.
Definition: ValidateHelpers.h:743
arm_compute::graph::backends::detail::validate_reorg_layer
Status validate_reorg_layer(ReorgLayerNode &node)
Validates a Reorg layer node.
Definition: ValidateHelpers.h:566
arm_compute::graph::ConvolutionLayerNode::convolution_method
ConvolutionMethod convolution_method() const
Convolution layer method accessor.
Definition: ConvolutionLayerNode.cpp:56
arm_compute::graph::backends::detail::validate_slice_layer
Status validate_slice_layer(SliceLayerNode &node)
Validates a Slice layer node.
Definition: ValidateHelpers.h:640
arm_compute::QuantizationInfo
Quantization information.
Definition: QuantizationInfo.h:67
arm_compute::PaddingList
std::vector< PaddingInfo > PaddingList
List of padding information.
Definition: Types.h:402
Helpers.h
arm_compute::graph::PriorBoxLayerNode
PriorBox Layer node.
Definition: PriorBoxLayerNode.h:34
arm_compute::graph::FastMathHint::Enabled
@ Enabled
Fast math enabled for Convolution layer.
arm_compute::graph::ConvolutionLayerNode::fast_math_hint
FastMathHint fast_math_hint() const
Fast math hint accessor.
Definition: ConvolutionLayerNode.cpp:66
arm_compute::graph::PriorBoxLayerNode::priorbox_info
PriorBoxLayerInfo priorbox_info() const
PriorBox metadata accessor.
Definition: PriorBoxLayerNode.cpp:41
arm_compute::graph::EltwiseLayerNode
Eltwise Layer node.
Definition: EltwiseLayerNode.h:34
arm_compute::graph::ConvolutionMethod::Direct
@ Direct
Deep direct convolution.
arm_compute::graph::backends::detail::validate_convolution_layer
Status validate_convolution_layer(ConvolutionLayerNode &node)
Validates a Convolution layer node.
Definition: ValidateHelpers.h:142
arm_compute::graph::backends::detail::validate_prelu_layer
Status validate_prelu_layer(PReluLayerNode &node)
Validates a PRelu layer node.
Definition: ValidateHelpers.h:468
arm_compute::graph::StridedSliceLayerNode::ends
Coordinates ends() const
End coordinates accessor.
Definition: StridedSliceLayerNode.cpp:50
arm_compute::graph::ChannelShuffleLayerNode
Channel Shuffle Layer node.
Definition: ChannelShuffleLayerNode.h:34
ARM_COMPUTE_ERROR
#define ARM_COMPUTE_ERROR(msg)
Print the given message then throw an std::runtime_error.
Definition: Error.h:354
arm_compute::graph::INode::output
Tensor * output(size_t idx) const
Returns the tensor of a given output of the node.
Definition: INode.cpp:158
arm_compute::graph::PadLayerNode
Pad Layer node.
Definition: PadLayerNode.h:34
arm_compute::graph::INode::num_inputs
size_t num_inputs() const
Returns number of inputs of the node.
Definition: INode.cpp:178
arm_compute::Size2D
Class for specifying the size of an image or rectangle.
Definition: Size2D.h:34
arm_compute::graph::EltwiseLayerNode::convert_policy
ConvertPolicy convert_policy() const
Convert policy accessor.
Definition: EltwiseLayerNode.cpp:45
arm_compute::graph::ReductionLayerNode
Reduction Operation node.
Definition: ReductionLayerNode.h:34
arm_compute::graph::backends::detail::validate_pad_layer
Status validate_pad_layer(PadLayerNode &node)
Validates a pad layer node.
Definition: ValidateHelpers.h:420
arm_compute::graph::Tensor
Tensor object.
Definition: Tensor.h:40
arm_compute::graph::UnaryEltwiseLayerNode
Unary Eltwise Layer node.
Definition: EltwiseLayerNode.h:91
arm_compute::graph::ConvolutionLayerNode::num_groups
unsigned int num_groups() const
Number of groups in convolution accessor.
Definition: ConvolutionLayerNode.cpp:76
arm_compute::graph::descriptors::UnaryEltwiseLayerDescriptor::op
UnaryEltwiseOperation op
Unary element-wise operation to perform.
Definition: LayerDescriptors.h:121
arm_compute::ITensorInfo::set_data_type
virtual ITensorInfo & set_data_type(DataType data_type)=0
Set the data type to the specified value.
ARM_COMPUTE_LOG_GRAPH_VERBOSE
#define ARM_COMPUTE_LOG_GRAPH_VERBOSE(x)
Definition: Logger.h:50
arm_compute::graph::PadLayerNode::padding
const PaddingList & padding() const
Padding list accessor.
Definition: PadLayerNode.cpp:40
arm_compute::graph::SliceLayerNode::starts
Coordinates starts() const
Start coordinates accessor.
Definition: SliceLayerNode.cpp:41
Error.h
ITensorInfo.h
arm_compute::graph::ReductionLayerNode::op
ReductionOperation op() const
op accessor
Definition: ReductionLayerNode.cpp:42
arm_compute::graph::GenerateProposalsLayerNode::info
const GenerateProposalsInfo & info() const
GenerateProposalsInfo accessor.
Definition: GenerateProposalsLayerNode.cpp:40
arm_compute::graph::EltwiseOperation::Sub
@ Sub
Arithmetic subtraction.
arm_compute::graph::backends::detail::validate_depth_to_space_layer
Status validate_depth_to_space_layer(DepthToSpaceLayerNode &node)
Validates a depth to space layer node.
Definition: ValidateHelpers.h:242
arm_compute::graph::L2NormalizeLayerNode::axis
int axis() const
axis accessors
Definition: L2NormalizeLayerNode.cpp:72
arm_compute::graph::UnaryEltwiseOperation::Exp
@ Exp
Exp.
arm_compute::graph::backends::detail::validate_permute_layer
Status validate_permute_layer(PermuteLayerNode &node)
Validates a permute layer node.
Definition: ValidateHelpers.h:444
arm_compute::graph::EltwiseOperation::Div
@ Div
Arithmetic division.
arm_compute::graph::DepthwiseConvolutionLayerNode::depthwise_convolution_method
DepthwiseConvolutionMethod depthwise_convolution_method() const
Depthwise convolution layer method accessor.
Definition: DepthwiseConvolutionLayerNode.cpp:59
arm_compute::graph::PermuteLayerNode
Permute Layer node.
Definition: PermuteLayerNode.h:34
arm_compute::ActivationLayerInfo
Activation Layer Information class.
Definition: ActivationLayerInfo.h:55
arm_compute::Strides
Strides of an item in bytes.
Definition: Strides.h:38
arm_compute::graph::backends::detail::validate_reduction_operation_layer
Status validate_reduction_operation_layer(ReductionLayerNode &node)
Validates a Reduction operation layer node.
Definition: ValidateHelpers.h:541
arm_compute::graph::backends::detail::validate_priorbox_layer
Status validate_priorbox_layer(PriorBoxLayerNode &node)
Validates a priorbox layer node.
Definition: ValidateHelpers.h:492
arm_compute::test::validation::act_info
act_info
Definition: DirectConvolutionLayer.cpp:547
arm_compute::graph::backends::detail::validate_arg_min_max_layer
Status validate_arg_min_max_layer(ArgMinMaxLayerNode &node)
Validates a ArgMinMax layer node.
Definition: ValidateHelpers.h:63
arm_compute::graph::PermuteLayerNode::permutation_vector
const PermutationVector & permutation_vector() const
Permutation vector accessor.
Definition: PermuteLayerNode.cpp:40
arm_compute::graph::BoundingBoxTransformLayerNode
Bounding Box Transform Layer node.
Definition: BoundingBoxTransformLayerNode.h:35
arm_compute::graph::ReductionLayerNode::keep_dims
bool keep_dims() const
keep_dims accessor
Definition: ReductionLayerNode.cpp:52
arm_compute::graph::backends::detail::validate_roi_align_layer
Status validate_roi_align_layer(ROIAlignLayerNode &node)
Validates a ROI Align layer node.
Definition: ValidateHelpers.h:614
arm_compute::graph::backends::detail::validate_dequantization_layer
Status validate_dequantization_layer(DequantizationLayerNode &node)
Validates a dequantize layer node.
Definition: ValidateHelpers.h:264
arm_compute::graph::NormalizePlanarYUVLayerNode
Batch Normalization Layer node.
Definition: NormalizePlanarYUVLayerNode.h:34
arm_compute::graph::ReductionLayerNode::axis
unsigned int axis() const
axis accessor
Definition: ReductionLayerNode.cpp:47
arm_compute::RoundingPolicy
RoundingPolicy
Rounding method.
Definition: Rounding.h:30
arm_compute::graph::ConvolutionLayerNode
Convolution Layer node.
Definition: ConvolutionLayerNode.h:34
arm_compute::graph::BoundingBoxTransformLayerNode::info
const BoundingBoxTransformInfo & info() const
BoundingBoxTransformInfo accessor.
Definition: BoundingBoxTransformLayerNode.cpp:40
arm_compute::graph::DetectionPostProcessLayerNode::detection_post_process_info
DetectionPostProcessLayerInfo detection_post_process_info() const
DetectionPostProcess metadata accessor.
Definition: DetectionPostProcessLayerNode.cpp:42
arm_compute::graph::QuantizationLayerNode
Quantization Layer node.
Definition: QuantizationLayerNode.h:34
arm_compute::graph::DequantizationLayerNode
Dequantize Layer node.
Definition: DequantizationLayerNode.h:38
ARM_COMPUTE_RETURN_ERROR_ON
#define ARM_COMPUTE_RETURN_ERROR_ON(cond)
If the condition is true, an error is returned.
Definition: Error.h:298
arm_compute::graph::L2NormalizeLayerNode
L2Normalize Layer node.
Definition: L2NormalizeLayerNode.h:34
arm_compute::graph::backends::detail::validate_strided_slice_layer
Status validate_strided_slice_layer(StridedSliceLayerNode &node)
Validates a Strided Slice layer node.
Definition: ValidateHelpers.h:665
arm_compute::graph::ROIAlignLayerNode
ROI Align node.
Definition: ROIAlignLayerNode.h:36
arm_compute::graph::ArgMinMaxLayerNode::reduction_operation
ReductionOperation reduction_operation() const
Operator accessor.
Definition: ArgMinMaxLayerNode.cpp:44
arm_compute::graph::ReshapeLayerNode
Reshape Layer node.
Definition: ReshapeLayerNode.h:34
arm_compute::Status
Status class.
Definition: Error.h:52
arm_compute::graph::backends::detail::validate_detection_post_process_layer
Status validate_detection_post_process_layer(DetectionPostProcessLayerNode &node)
Validates a detection post process layer node.
Definition: ValidateHelpers.h:311
arm_compute::graph::ChannelShuffleLayerNode::num_groups
unsigned int num_groups() const
Number of groups accessor.
Definition: ChannelShuffleLayerNode.cpp:39
arm_compute::graph::backends::detail::validate_eltwise_Layer
Status validate_eltwise_Layer(EltwiseLayerNode &node)
Validates a element-wise layer node.
Definition: ValidateHelpers.h:691
arm_compute::graph::DetectionPostProcessLayerNode
DetectionPostProcess Layer node.
Definition: DetectionPostProcessLayerNode.h:34
arm_compute::DetectionOutputLayerInfo
Detection Output layer info.
Definition: Types.h:790
arm_compute::graph::backends::detail::validate_channel_shuffle_layer
Status validate_channel_shuffle_layer(ChannelShuffleLayerNode &node)
Validates a Channel Shuffle layer node.
Definition: ValidateHelpers.h:112
arm_compute::graph::DepthToSpaceLayerNode::block_shape
int block_shape() const
Block shape policy accessor.
Definition: DepthToSpaceLayerNode.cpp:41
arm_compute::graph::StridedSliceLayerNode::strided_slice_info
StridedSliceLayerInfo strided_slice_info() const
Definition: StridedSliceLayerNode.cpp:60
arm_compute::graph::INode::name
std::string name() const
Returns node's name.
Definition: INode.cpp:107
arm_compute::graph::EltwiseOperation::Max
@ Max
Arithmetic maximum.
arm_compute::graph::PReluLayerNode
PRelu Layer node.
Definition: PReluLayerNode.h:34
arm_compute::graph::ConvolutionMethod::GEMM
@ GEMM
GEMM based convolution.
arm_compute::PriorBoxLayerInfo
PriorBox layer info.
Definition: Types.h:647
arm_compute::graph::backends::detail::validate_depthwise_convolution_layer
Status validate_depthwise_convolution_layer(DepthwiseConvolutionLayerNode &node)
Validates a Depthwise Convolution layer node.
Definition: ValidateHelpers.h:202
arm_compute::Coordinates
Coordinates of an item.
Definition: Coordinates.h:37
tensor
CLTensor * tensor
Pointer to the auxiliary tensor.
Definition: ClWorkloadRuntime.cpp:67
arm_compute::PadStrideInfo
Definition: CoreTypes.h:139
arm_compute::DetectionPostProcessLayerInfo
Detection Output layer info.
Definition: Types.h:917
arm_compute::graph::DetectionOutputLayerNode::detection_output_info
DetectionOutputLayerInfo detection_output_info() const
DetectionOutput metadata accessor.
Definition: DetectionOutputLayerNode.cpp:41
arm_compute::graph::ArgMinMaxLayerNode
Arg Min/Max Layer node.
Definition: ArgMinMaxLayerNode.h:34
Nodes.h
arm_compute::BoundingBoxTransformInfo
Bounding Box Transform information class.
Definition: Types.h:1453
Logger.h
arm_compute::graph::DepthToSpaceLayerNode
DepthToSpace Layer node.
Definition: DepthToSpaceLayerNode.h:34
arm_compute::graph::backends::detail::validate_bounding_box_transform_layer
Status validate_bounding_box_transform_layer(BoundingBoxTransformLayerNode &node)
Validates a Bounding Box Transform layer node.
Definition: ValidateHelpers.h:87
Types.h
arm_compute::graph::NodeType::ConvolutionLayer
@ ConvolutionLayer
arm_compute::graph::EltwiseLayerNode::output_quant_info
QuantizationInfo output_quant_info() const
Returns output quantization info.
Definition: EltwiseLayerNode.cpp:60
arm_compute::test::validation::num_groups
const unsigned int num_groups
Definition: Im2Col.cpp:153
arm_compute::graph::ConvolutionMethod
ConvolutionMethod
Supported Convolution layer methods.
Definition: Types.h:130
arm_compute::graph::EltwiseOperation::Add
@ Add
Arithmetic addition.
arm_compute::graph::ArgMinMaxLayerNode::axis
unsigned int axis() const
Axis accessor.
Definition: ArgMinMaxLayerNode.cpp:49
arm_compute::graph::GenerateProposalsLayerNode
Generate Proposals Layer node.
Definition: GenerateProposalsLayerNode.h:35
ARM_COMPUTE_RETURN_ERROR_ON_MSG
#define ARM_COMPUTE_RETURN_ERROR_ON_MSG(cond, msg)
If the condition is true, an error is returned.
Definition: Error.h:245
arm_compute::graph::backends::detail::validate_generate_proposals_layer
Status validate_generate_proposals_layer(GenerateProposalsLayerNode &node)
Validates a Generate Proposals layer node.
Definition: ValidateHelpers.h:340
arm_compute::graph::backends::detail::validate_detection_output_layer
Status validate_detection_output_layer(DetectionOutputLayerNode &node)
Validates a detection output layer node.
Definition: ValidateHelpers.h:286
arm_compute
Copyright (c) 2017-2023 Arm Limited.
Definition: introduction.dox:24
arm_compute::graph::SliceLayerNode::ends
Coordinates ends() const
End coordinates accessor.
Definition: SliceLayerNode.cpp:46
arm_compute::test::validation::conv_info
conv_info
Definition: DirectConvolutionLayer.cpp:547
arm_compute::ConvertPolicy
ConvertPolicy
Policy to handle integer overflow.
Definition: Types.h:353
arm_compute::graph::ConvolutionLayerNode::convolution_info
PadStrideInfo convolution_info() const
Convolution metadata accessor.
Definition: ConvolutionLayerNode.cpp:71
arm_compute::graph::EltwiseLayerNode::fused_activation
ActivationLayerInfo fused_activation() const
Returns fused activation.
Definition: EltwiseLayerNode.cpp:55
arm_compute::DataType::S32
@ S32
signed 32-bit number
Tensor.h
arm_compute::graph::INode::input
Tensor * input(size_t idx) const
Returns the tensor of a given input of the node.
Definition: INode.cpp:150
arm_compute::is_data_type_quantized_asymmetric
bool is_data_type_quantized_asymmetric(DataType dt)
Check if a given data type is of asymmetric quantized type.
Definition: DataTypeUtils.h:346
arm_compute::graph::backends::detail::validate_reshape_layer
Status validate_reshape_layer(ReshapeLayerNode &node)
Validates a Reshape layer node.
Definition: ValidateHelpers.h:590
arm_compute::graph::INode::num_outputs
size_t num_outputs() const
Returns number of outputs of the node.
Definition: INode.cpp:183
arm_compute::StridedSliceLayerInfo
Definition: Types.h:1613
arm_compute::graph::DepthwiseConvolutionMethod::Optimized3x3
@ Optimized3x3
Optimized 3x3 direct depthwise convolution.
arm_compute::validate
Status validate(const ITensorInfo *scores_in, const ITensorInfo *boxes_in, const ITensorInfo *batch_splits_in, const ITensorInfo *scores_out, const ITensorInfo *boxes_out, const ITensorInfo *classes, const ITensorInfo *batch_splits_out, const ITensorInfo *keeps, const ITensorInfo *keeps_size, const BoxNMSLimitInfo info)
Definition: CPPBoxWithNonMaximaSuppressionLimit.cpp:243
arm_compute::ITensorInfo
Store the tensor's metadata.
Definition: ITensorInfo.h:44
arm_compute::graph::DepthwiseConvolutionMethod
DepthwiseConvolutionMethod
Supported Depthwise Convolution layer methods.
Definition: Types.h:139
arm_compute::graph::backends::detail::validate_normalize_planar_yuv_layer
Status validate_normalize_planar_yuv_layer(NormalizePlanarYUVLayerNode &node)
Validates a NormalizePlanarYUV layer node.
Definition: ValidateHelpers.h:394
arm_compute::graph::DepthwiseConvolutionMethod::Default
@ Default
Default approach using internal heuristics.
ARM_COMPUTE_RETURN_ERROR_MSG
#define ARM_COMPUTE_RETURN_ERROR_MSG(...)
An error is returned with the given description.
Definition: Error.h:195
arm_compute::graph::ReorgLayerNode
Reorg Layer node.
Definition: ReorgLayerNode.h:34
arm_compute::graph::backends::detail::get_backing_tensor_info
arm_compute::ITensorInfo * get_backing_tensor_info(arm_compute::graph::Tensor *tensor)
Returns backing tensor info of a given tensor.
Definition: ValidateHelpers.h:49
arm_compute::graph::EltwiseLayerNode::eltwise_operation
EltwiseOperation eltwise_operation() const
Eltwise operation accessor.
Definition: EltwiseLayerNode.cpp:40
arm_compute::graph::StridedSliceLayerNode::strides
BiStrides strides() const
Strides vector accessor.
Definition: StridedSliceLayerNode.cpp:55
arm_compute::graph::L2NormalizeLayerNode::epsilon
float epsilon() const
epsilon accessors
Definition: L2NormalizeLayerNode.cpp:77
arm_compute::test::validation::info
ScaleKernelInfo info(interpolation_policy, default_border_mode, PixelValue(), sampling_policy, false)
arm_compute::graph::StridedSliceLayerNode::starts
Coordinates starts() const
Start coordinates accessor.
Definition: StridedSliceLayerNode.cpp:45
arm_compute::graph::EltwiseOperation
EltwiseOperation
Supported Element-wise operations.
Definition: Types.h:113
arm_compute::graph::ConvolutionMethod::Winograd
@ Winograd
Winograd based convolution.
arm_compute::graph::INode::id
NodeID id() const
Returns node's ID.
Definition: INode.cpp:102
arm_compute::graph::SliceLayerNode
Slice Layer node.
Definition: SliceLayerNode.h:36
arm_compute::graph::StridedSliceLayerNode
Slice Layer node.
Definition: StridedSliceLayerNode.h:36
arm_compute::graph::DepthwiseConvolutionLayerNode::depth_multiplier
int depth_multiplier() const
Depth multiplier accessor.
Definition: DepthwiseConvolutionLayerNode.cpp:49
arm_compute::graph::backends::detail::validate_l2_normalize_layer
Status validate_l2_normalize_layer(L2NormalizeLayerNode &node)
Validates a L2Normalization layer node.
Definition: ValidateHelpers.h:368
arm_compute::graph::DetectionOutputLayerNode
DetectionOutput Layer node.
Definition: DetectionOutputLayerNode.h:34
arm_compute::ROIPoolingLayerInfo
ROI Pooling Layer Information class.
Definition: Types.h:1259
arm_compute::graph::UnaryEltwiseOperation
UnaryEltwiseOperation
Supported Unary Element-wise operations.
Definition: Types.h:124
arm_compute::GenerateProposalsInfo
Generate Proposals Information class.
Definition: Types.h:1308
arm_compute::graph::DepthwiseConvolutionLayerNode::convolution_info
PadStrideInfo convolution_info() const
Convolution metadata accessor.
Definition: DepthwiseConvolutionLayerNode.cpp:64
arm_compute::graph::DepthwiseConvolutionLayerNode
Depthwise Convolution Layer node.
Definition: DepthwiseConvolutionLayerNode.h:34
arm_compute::test::validation::input
auto input
Definition: LSTMLayerQuantized.cpp:486
arm_compute::graph::ROIAlignLayerNode::pooling_info
const ROIPoolingLayerInfo & pooling_info() const
ROIPoolingLayerInfo accessor.
Definition: ROIAlignLayerNode.cpp:41
arm_compute::graph::EltwiseLayerNode::rounding_policy
RoundingPolicy rounding_policy() const
Rounding policy accessor.
Definition: EltwiseLayerNode.cpp:50
arm_compute::graph::backends::detail::validate_quantization_layer
Status validate_quantization_layer(QuantizationLayerNode &node)
Validates a Quantization layer node.
Definition: ValidateHelpers.h:517
arm_compute::quantization::epsilon
constexpr float epsilon
Definition: AsymmHelpers.cpp:41