Compute Library
 21.11
ValidateHelpers.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2018-2021 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 ARM_COMPUTE_GRAPH_BACKENDS_DETAIL_VALIDATE_HELPERS_H
25 #define ARM_COMPUTE_GRAPH_BACKENDS_DETAIL_VALIDATE_HELPERS_H
26 
31 
32 #include "arm_compute/core/Error.h"
35 
36 namespace arm_compute
37 {
38 namespace graph
39 {
40 namespace backends
41 {
42 namespace detail
43 {
44 /** Returns backing tensor info of a given tensor
45  *
46  * @param[in] tensor Tensor to extract the backing tensor from
47  *
48  * @return Backing tensor tensor info if present else nullptr
49  */
51 {
52  return ((tensor == nullptr) || (tensor->handle() == nullptr)) ? nullptr : tensor->handle()->tensor().info();
53 }
54 
55 /** Validates a ArgMinMax layer node
56  *
57  * @tparam ArgMinMax layer function type
58  *
59  * @param[in] node Node to validate
60  *
61  * @return Status
62  */
63 template <typename ArgMinMaxLayer>
65 {
66  ARM_COMPUTE_LOG_GRAPH_VERBOSE("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: " << node.name() << std::endl);
92 
93  // Extract IO and info
97  const BoundingBoxTransformInfo bbox_info = node.info();
98 
99  return BoundingBoxTransformLayer::validate(input, output, deltas, bbox_info);
100 }
101 
102 /** Validates a Channel Shuffle layer node
103  *
104  * @tparam ChannelShuffleLayer Channel Shuffle layer function type
105  *
106  * @param[in] node Node to validate
107  *
108  * @return Status
109  */
110 template <typename ChannelShuffleLayer>
112 {
113  ARM_COMPUTE_LOG_GRAPH_VERBOSE("Validating ChannelShuffle node with ID : " << node.id() << " and Name: " << node.name() << std::endl);
116 
117  // Extract IO and info
120  const unsigned int num_groups = node.num_groups();
121 
122  return ChannelShuffleLayer::validate(input, output, num_groups);
123 }
124 
125 /** Validates a Convolution layer node
126  *
127  * @tparam ConvolutionLayer Default Convolution layer function type
128  * @tparam DirectConvolutionLayer Direct Convolution layer function type
129  * @tparam GEMMConvolutionLayer GEMM Convolution layer function type
130  * @tparam WinogradConvolutionLayer Winograd Convolution layer function type
131  *
132  * @param[in] node Node to validate
133  *
134  * @return Status
135  */
136 template <typename ConvolutionLayer, typename DirectConvolutionLayer, typename GEMMConvolutionLayer, typename WinogradConvolutionLayer>
138 {
139  ARM_COMPUTE_LOG_GRAPH_VERBOSE("Validating ConvolutionLayer node with ID : " << node.id() << " and Name: " << node.name() << std::endl);
142 
143  // Extract IO and info
148 
149  if(is_data_type_quantized_asymmetric(input->data_type()))
150  {
151  biases->set_data_type(DataType::S32);
152  }
153 
155  const ConvolutionMethod conv_algorithm = node.convolution_method();
156  const bool fast_math = node.fast_math_hint() == FastMathHint::Enabled;
157  const unsigned int num_groups = node.num_groups();
158 
159  // Validate function
160  Status status{};
161  switch(conv_algorithm)
162  {
164  ARM_COMPUTE_RETURN_ERROR_ON_MSG(num_groups != 1, "DirectConvolutionLayer does not support grouping!");
165  status = DirectConvolutionLayer::validate(input, weights, biases, output, conv_info);
166  break;
168  status = GEMMConvolutionLayer::validate(input, weights, biases, output, conv_info,
169  WeightsInfo(), Size2D(1, 1), ActivationLayerInfo(), num_groups);
170  break;
172  ARM_COMPUTE_RETURN_ERROR_ON_MSG(num_groups != 1, "WinogradConvolutionLayer does not support grouping!");
173  status = WinogradConvolutionLayer::validate(input, weights, biases, output, conv_info, ActivationLayerInfo(), fast_math);
174  break;
176  status = ConvolutionLayer::validate(input, weights, biases, output, conv_info,
177  WeightsInfo(), Size2D(1, 1), ActivationLayerInfo(), fast_math, num_groups);
178  break;
179  default:
180  ARM_COMPUTE_RETURN_ERROR_MSG("Unsupported convolution method");
181  }
182 
183  return status;
184 }
185 
186 /** Validates a Convolution layer node
187  *
188  * @tparam GEMMConvolutionLayer GEMM Convolution layer function type
189  *
190  * @param[in] node Node to validate
191  *
192  * @return Status
193  */
194 template <typename GEMMConvolutionLayer>
196 {
197  ARM_COMPUTE_LOG_GRAPH_VERBOSE("Validating fused ConvolutionLayer node with ID : " << node.id() << " and Name: " << node.name() << std::endl);
200 
201  // Extract IO and info
206 
207  if(is_data_type_quantized_asymmetric(input->data_type()))
208  {
209  biases->set_data_type(DataType::S32);
210  }
211 
213  //const ConvolutionMethod conv_algorithm = node.convolution_method();
214  //const bool fast_math = node.fast_math_hint() == FastMathHint::Enabled;
215  const unsigned int num_groups = node.num_groups();
216 
217  // Validate function
218  return GEMMConvolutionLayer::validate(input, weights, biases, output, conv_info,
219  WeightsInfo(), Size2D(1, 1), ActivationLayerInfo(), num_groups);
220 }
221 
222 /** Validates a Depthwise Convolution layer node
223  *
224  * @tparam DepthwiseConvolutionLayer Default Depthwise Convolution layer type
225  *
226  * @param[in] node Node to validate
227  *
228  * @return Status
229  */
230 template <typename DepthwiseConvolutionLayer>
232 {
233  ARM_COMPUTE_LOG_GRAPH_VERBOSE("Validating DepthwiseConvolutionLayer node with ID : " << node.id() << " and Name: " << node.name() << std::endl);
236 
237  // Extract IO and info
242 
244  const DepthwiseConvolutionMethod dwc_algorithm = node.depthwise_convolution_method();
245  const int depth_multiplier = node.depth_multiplier();
246 
247  // Validate function
248  Status status{};
249  switch(dwc_algorithm)
250  {
253  status = DepthwiseConvolutionLayer::validate(input, weights, biases, output, conv_info, depth_multiplier);
254  break;
255  default:
256  ARM_COMPUTE_RETURN_ERROR_MSG("Unsupported depthwise convolution method");
257  }
258 
259  return status;
260 }
261 /** Validates a depth to space layer node
262  *
263  * @tparam DequantizationLayer Dequantize layer type
264  *
265  * @param[in] node Node to validate
266  *
267  * @return Status
268  */
269 template <typename DepthToSpaceLayer>
271 {
272  ARM_COMPUTE_LOG_GRAPH_VERBOSE("Validating DetectionOutputLayer node with ID : " << node.id() << " and Name: " << node.name() << std::endl);
275 
276  // Extract IO and info
279 
280  return DepthToSpaceLayer::validate(input, output, node.block_shape());
281 }
282 /** Validates a dequantize layer node
283  *
284  * @tparam DequantizationLayer Dequantize layer type
285  *
286  * @param[in] node Node to validate
287  *
288  * @return Status
289  */
290 template <typename DequantizationLayer>
292 {
293  ARM_COMPUTE_LOG_GRAPH_VERBOSE("Validating DetectionOutputLayer node with ID : " << node.id() << " and Name: " << node.name() << std::endl);
296 
297  // Extract IO and info
300 
301  return DequantizationLayer::validate(input, output);
302 }
303 /** Validates a detection output layer node
304  *
305  * @tparam DetectionOutputLayer DetectionOutput layer type
306  *
307  * @param[in] node Node to validate
308  *
309  * @return Status
310  */
311 template <typename DetectionOutputLayer>
313 {
314  ARM_COMPUTE_LOG_GRAPH_VERBOSE("Validating DetectionOutputLayer node with ID : " << node.id() << " and Name: " << node.name() << std::endl);
317 
318  // Extract IO and info
323  const DetectionOutputLayerInfo detect_info = node.detection_output_info();
324 
325  return DetectionOutputLayer::validate(input0, input1, input2, output, detect_info);
326 }
327 /** Validates a detection post process layer node
328  *
329  * @tparam DetectionPostProcessLayer DetectionOutput layer type
330  *
331  * @param[in] node Node to validate
332  *
333  * @return Status
334  */
335 template <typename DetectionPostProcessLayer>
337 {
338  ARM_COMPUTE_LOG_GRAPH_VERBOSE("Validating DetectionPostProcessLayer node with ID : " << node.id() << " and Name: " << node.name() << std::endl);
341 
342  // Extract IO and info
351 
352  return DetectionPostProcessLayer::validate(input0, input1, input2, output0, output1, output2, output3, detect_info);
353 }
354 
355 /** Validates a Generate Proposals layer node
356  *
357  * @tparam GenerateProposalsLayer Generate Proposals layer type
358  *
359  * @param[in] node Node to validate
360  *
361  * @return Status
362  */
363 template <typename GenerateProposalsLayer>
365 {
366  ARM_COMPUTE_LOG_GRAPH_VERBOSE("Validating GenerateProposalsLayer node with ID : " << node.id() << " and Name: " << node.name() << std::endl);
369 
370  // Extract IO and info
376  arm_compute::ITensorInfo *num_valid_proposals = get_backing_tensor_info(node.output(2));
377  const GenerateProposalsInfo info = node.info();
378 
379  return GenerateProposalsLayer::validate(scores, deltas, anchors, proposals, scores_out, num_valid_proposals, info);
380 }
381 
382 /** Validates a L2Normalization layer node
383  *
384  * @tparam L2Normalization layer type
385  *
386  * @param[in] node Node to validate
387  *
388  * @return Status
389  */
390 template <typename L2NormalizeLayer>
392 {
393  ARM_COMPUTE_LOG_GRAPH_VERBOSE("Validating L2NormalizeLayerNode node with ID : " << node.id() << " and Name: " << node.name() << std::endl);
396 
397  // Extract IO and info
400  int axis = node.axis();
401  float epsilon = node.epsilon();
402 
403  // Validate function
404  return L2NormalizeLayer::validate(input, output, axis, epsilon);
405 }
406 
407 /** Validates a NormalizePlanarYUV layer node
408  *
409  * @tparam NormalizePlanarYUVLayer layer type
410  *
411  * @param[in] node Node to validate
412  *
413  * @return Status
414  */
415 template <typename NormalizePlanarYUVLayer>
417 {
418  ARM_COMPUTE_LOG_GRAPH_VERBOSE("Validating NormalizePlanarYUVLayer node with ID : " << node.id() << " and Name: " << node.name() << std::endl);
421 
422  // Extract IO and info
427 
428  // Validate function
429  return NormalizePlanarYUVLayer::validate(input, output, mean, std);
430 }
431 
432 /** Validates a pad layer node
433  *
434  * @tparam PadLayer Pad layer type
435  *
436  * @param[in] node Node to validate
437  *
438  * @return Status
439  */
440 template <typename PadLayer>
442 {
443  ARM_COMPUTE_LOG_GRAPH_VERBOSE("Validating PadLayer node with ID : " << node.id() << " and Name: " << node.name() << std::endl);
446 
447  // Extract IO and info
450  const PaddingList &padding = node.padding();
451 
452  return PadLayer::validate(input, output, padding);
453 }
454 
455 /** Validates a permute layer node
456  *
457  * @tparam PermuteLayer Permute layer type
458  *
459  * @param[in] node Node to validate
460  *
461  * @return Status
462  */
463 template <typename PermuteLayer>
465 {
466  ARM_COMPUTE_LOG_GRAPH_VERBOSE("Validating PermuteLayer node with ID : " << node.id() << " and Name: " << node.name() << std::endl);
469 
470  // Extract IO and info
473  const PermutationVector &perm = node.permutation_vector();
474 
475  return PermuteLayer::validate(input, output, perm);
476 }
477 
478 /** Validates a PRelu layer node
479  *
480  * @tparam PReluLayer PRelu layer type
481  *
482  * @param[in] node Node to validate
483  *
484  * @return Status
485  */
486 template <typename PReluLayer>
488 {
489  ARM_COMPUTE_LOG_GRAPH_VERBOSE("Validating PRelu node with ID : " << node.id() << " and Name: " << node.name() << std::endl);
492 
493  // Extract IO and info
497 
498  return PReluLayer::validate(input, alpha, output);
499 }
500 
501 /** Validates a priorbox layer node
502  *
503  * @tparam PriorBoxLayer PriorBox layer type
504  *
505  * @param[in] node Node to validate
506  *
507  * @return Status
508  */
509 template <typename PriorBoxLayer>
511 {
512  ARM_COMPUTE_LOG_GRAPH_VERBOSE("Validating PriorBoxLayer node with ID : " << node.id() << " and Name: " << node.name() << std::endl);
515 
516  // Extract IO and info
520  const PriorBoxLayerInfo prior_info = node.priorbox_info();
521 
522  return PriorBoxLayer::validate(input0, input1, output, prior_info);
523 }
524 
525 /** Validates a Quantization layer node
526  *
527  * @tparam QuantizationLayer Quantization layer type
528  *
529  * @param[in] node Node to validate
530  *
531  * @return Status
532  */
533 template <typename QuantizationLayer>
535 {
536  ARM_COMPUTE_LOG_GRAPH_VERBOSE("Validating QuantizationLayer node with ID : " << node.id() << " and Name: " << node.name() << std::endl);
539 
540  // Extract input and output
543 
544  // Validate function
545  return QuantizationLayer::validate(input, output);
546 }
547 
548 /** Validates a Reduction operation layer node
549  *
550  * @tparam ReductionLayer Reduction layer type
551  *
552  * @param[in] node Node to validate
553  *
554  * @return Status
555  */
556 template <typename ReductionLayer>
558 {
559  ARM_COMPUTE_LOG_GRAPH_VERBOSE("Validating ReductionLayer node with ID : " << node.id() << " and Name: " << node.name() << std::endl);
560 
563 
564  // Extract input and output
567 
568  // Validate function
569  return ReductionLayer::validate(input, output, node.axis(), node.op(), node.keep_dims());
570 }
571 
572 /** Validates a Reorg layer node
573  *
574  * @tparam ReorgLayer Reorg layer type
575  *
576  * @param[in] node Node to validate
577  *
578  * @return Status
579  */
580 template <typename ReorgLayer>
582 {
583  ARM_COMPUTE_LOG_GRAPH_VERBOSE("Validating ReorgLayer node with ID : " << node.id() << " and Name: " << node.name() << std::endl);
586 
587  // Extract input and output
590 
591  // Validate function
592  return ReorgLayer::validate(input, output, node.stride());
593 }
594 
595 /** Validates a Reshape layer node
596  *
597  * @tparam ReshapeLayer Reshape layer type
598  *
599  * @param[in] node Node to validate
600  *
601  * @return Status
602  */
603 template <typename ReshapeLayer>
605 {
606  ARM_COMPUTE_LOG_GRAPH_VERBOSE("Validating ReshapeLayer node with ID : " << node.id() << " and Name: " << node.name() << std::endl);
609 
610  // Extract input and output
613 
614  // Validate function
615  return ReshapeLayer::validate(input, output);
616 }
617 
618 /** Validates a ROI Align layer node
619  *
620  * @tparam ROIAlignLayer ROIAlign layer type
621  *
622  * @param[in] node Node to validate
623  *
624  * @return Status
625  */
626 template <typename ROIAlignLayer>
628 {
629  ARM_COMPUTE_LOG_GRAPH_VERBOSE("Validating ROIAlignLayer node with ID : " << node.id() << " and Name: " << node.name() << std::endl);
632 
633  // Extract input and output
637  const ROIPoolingLayerInfo &pool_info = node.pooling_info();
638 
639  // Validate function
640  return ROIAlignLayer::validate(input, rois, output, pool_info);
641 }
642 
643 /** Validates a Slice layer node
644  *
645  * @tparam SliceLayer Slice layer function type
646  *
647  * @param[in] node Node to validate
648  *
649  * @return Status
650  */
651 template <typename SliceLayer>
653 {
654  ARM_COMPUTE_LOG_GRAPH_VERBOSE("Validating Slice node with ID : " << node.id() << " and Name: " << node.name() << std::endl);
657 
658  // Extract IO and info
661  const Coordinates starts = node.starts();
662  const Coordinates ends = node.ends();
663 
664  return SliceLayer::validate(input, output, starts, ends);
665 }
666 
667 /** Validates a Strided Slice layer node
668  *
669  * @tparam StridedSliceLayer Strided Slice layer function type
670  *
671  * @param[in] node Node to validate
672  *
673  * @return Status
674  */
675 template <typename StridedSliceLayer>
677 {
678  ARM_COMPUTE_LOG_GRAPH_VERBOSE("Validating StridedSlice node with ID : " << node.id() << " and Name: " << node.name() << std::endl);
681 
682  // Extract IO and info
685  const Coordinates starts = node.starts();
686  const Coordinates ends = node.ends();
687  const BiStrides strides = node.strides();
689 
690  return StridedSliceLayer::validate(input, output, starts, ends, strides, info.begin_mask(), info.end_mask(), info.shrink_axis_mask());
691 }
692 
693 /** Validates a element-wise layer node
694  *
695  * @param[in] node Node to validate
696  *
697  * @return Status
698  */
699 template <typename EltwiseLayerFunctions>
701 {
702  ARM_COMPUTE_LOG_GRAPH_VERBOSE("Validating EltwiseLayer node with ID : " << node.id() << " and Name: " << node.name() << std::endl);
705 
706  // Extract input and output
710  const EltwiseOperation eltwise_op = node.eltwise_operation();
711  const ConvertPolicy convert_policy = node.convert_policy();
712  const RoundingPolicy round_policy = node.rounding_policy();
713  const ActivationLayerInfo act_info = node.fused_activation();
714  const QuantizationInfo quant_info = node.output_quant_info();
715 
716  // Validate function
717  if(eltwise_op == EltwiseOperation::Add)
718  {
719  return EltwiseLayerFunctions::ArithmeticAddition::validate(input1, input2, output, convert_policy, act_info);
720  }
721  else if(eltwise_op == EltwiseOperation::Sub)
722  {
723  return EltwiseLayerFunctions::ArithmeticSubtraction::validate(input1, input2, output, convert_policy, act_info);
724  }
725  else if(eltwise_op == EltwiseOperation::Mul)
726  {
727  return EltwiseLayerFunctions::PixelWiseMultiplication::validate(input1, input2, output, 1.0f, convert_policy, round_policy, act_info);
728  }
729  else if(eltwise_op == EltwiseOperation::Max)
730  {
731  return EltwiseLayerFunctions::ElementwiseMax::validate(input1, input2, output, act_info);
732  }
733  else if(eltwise_op == EltwiseOperation::Div)
734  {
735  return EltwiseLayerFunctions::ArithmeticDivision::validate(input1, input2, output, act_info);
736  }
737  else
738  {
739  ARM_COMPUTE_ERROR("Unsupported element-wise operation!");
740  }
741  return Status{};
742 }
743 /** Validates a unary element-wise layer node
744  *
745  * @param[in] node Node to validate
746  *
747  * @return Status
748  */
749 template <typename UnaryEltwiseLayerFunctions>
751 {
752  ARM_COMPUTE_LOG_GRAPH_VERBOSE("Validating EltwiseLayer node with ID : " << node.id() << " and Name: " << node.name() << std::endl);
755 
756  // Extract input and output
759  const UnaryEltwiseOperation eltwise_op = node.eltwise_descriptor().op;
760 
761  // Validate function
762  if(eltwise_op == UnaryEltwiseOperation::Exp)
763  {
765  }
766  else
767  {
768  ARM_COMPUTE_ERROR("Unsupported unary element-wise operation!");
769  }
770 
771  return Status{};
772 }
773 } // namespace detail
774 } // namespace backends
775 } // namespace graph
776 } // namespace arm_compute
777 
778 #endif /* ARM_COMPUTE_GRAPH_BACKENDS_DETAIL_VALIDATE_HELPERS_H */
std::string name() const
Returns node&#39;s name.
Definition: INode.cpp:108
Status validate_generate_proposals_layer(GenerateProposalsLayerNode &node)
Validates a Generate Proposals layer node.
Status validate_fused_convolution_with_post_op(FusedConvolutionWithPostOpNode &node)
Validates a Convolution layer node.
Status validate_bounding_box_transform_layer(BoundingBoxTransformLayerNode &node)
Validates a Bounding Box Transform layer node.
Generate Proposals Information class.
Definition: Types.h:1311
EltwiseOperation
Supported Element-wise operations.
Definition: Types.h:109
int stride() const
Stride value to use for reorganizing the values in the output tensor.
RoundingPolicy rounding_policy() const
Rounding policy accessor.
const ROIPoolingLayerInfo & pooling_info() const
ROIPoolingLayerInfo accessor.
Status validate_permute_layer(PermuteLayerNode &node)
Validates a permute layer node.
std::vector< PaddingInfo > PaddingList
List of padding information.
Definition: Types.h:440
ITensorHandle * handle()
Backend tensor handle accessor.
Definition: Tensor.cpp:55
arm_compute::ITensorInfo * get_backing_tensor_info(arm_compute::graph::Tensor *tensor)
Returns backing tensor info of a given tensor.
FastMathHint fast_math_hint() const
Fast math hint accessor.
#define ARM_COMPUTE_ERROR(msg)
Print the given message then throw an std::runtime_error.
Definition: Error.h:352
unsigned int num_groups() const
Number of groups accessor.
size_t num_outputs() const
Returns number of outputs of the node.
Definition: INode.cpp:184
virtual arm_compute::ITensor & tensor()=0
Backend tensor object accessor.
Status validate_prelu_layer(PReluLayerNode &node)
Validates a PRelu layer node.
ReductionOperation op() const
op accessor
Status validate_detection_post_process_layer(DetectionPostProcessLayerNode &node)
Validates a detection post process layer node.
Status validate_l2_normalize_layer(L2NormalizeLayerNode &node)
Validates a L2Normalization layer node.
const PermutationVector & permutation_vector() const
Permutation vector accessor.
Fast math enabled for Convolution layer.
Store the tensor&#39;s metadata.
Definition: ITensorInfo.h:40
DepthwiseConvolutionMethod depthwise_convolution_method() const
Depthwise convolution layer method accessor.
Status class.
Definition: Error.h:52
EltwiseOperation eltwise_operation() const
Eltwise operation accessor.
#define ARM_COMPUTE_RETURN_ERROR_ON(cond)
If the condition is true, an error is returned.
Definition: Error.h:296
Activation Layer Information class.
Definition: Types.h:1509
unsigned int num_groups() const
Number of groups in convolution accessor.
Copyright (c) 2017-2021 Arm Limited.
Status validate_slice_layer(SliceLayerNode &node)
Validates a Slice layer node.
descriptors::UnaryEltwiseLayerDescriptor eltwise_descriptor() const
Unary eltwise layer descriptor.
Convolution Layer Weights Information class.
Definition: Types.h:1728
1 channel, 1 S32 per channel
Status validate_reorg_layer(ReorgLayerNode &node)
Validates a Reorg layer node.
Quantization information.
Status validate_eltwise_Layer(EltwiseLayerNode &node)
Validates a element-wise layer node.
const PaddingList & padding() const
Padding list accessor.
float epsilon() const
epsilon accessors
Status validate_detection_output_layer(DetectionOutputLayerNode &node)
Validates a detection output layer node.
QuantizationInfo output_quant_info() const
Returns output quantization info.
unsigned int axis() const
axis accessor
bool keep_dims() const
keep_dims accessor
Status validate_roi_align_layer(ROIAlignLayerNode &node)
Validates a ROI Align layer node.
Coordinates ends() const
End coordinates accessor.
Tensor * output(size_t idx) const
Returns the tensor of a given output of the node.
Definition: INode.cpp:159
ActivationLayerInfo fused_activation() const
Returns fused activation.
const unsigned int num_groups
Definition: Im2Col.cpp:153
DepthwiseConvolutionMethod
Supported Depthwise Convolution layer methods.
Definition: Types.h:135
Coordinates of an item.
Definition: Coordinates.h:37
Coordinates starts() const
Start coordinates accessor.
DetectionPostProcessLayerInfo detection_post_process_info() const
DetectionPostProcess metadata accessor.
Coordinates ends() const
End coordinates accessor.
PadStrideInfo convolution_info() const
Convolution metadata accessor.
NodeID id() const
Returns node&#39;s ID.
Definition: INode.cpp:103
RoundingPolicy
Rounding method.
Definition: Rounding.h:30
Status validate_depth_to_space_layer(DepthToSpaceLayerNode &node)
Validates a depth to space layer node.
UnaryEltwiseOperation op
Unary element-wise operation to perform.
virtual ITensorInfo * info() const =0
Interface to be implemented by the child class to return the tensor&#39;s metadata.
Status validate_reshape_layer(ReshapeLayerNode &node)
Validates a Reshape layer node.
PriorBox layer info.
Definition: Types.h:798
PadStrideInfo convolution_info() const
Convolution metadata accessor.
Padding and stride information class.
Definition: Types.h:656
DetectionOutputLayerInfo detection_output_info() const
DetectionOutput metadata accessor.
Status validate_pad_layer(PadLayerNode &node)
Validates a pad layer node.
Bounding Box Transform information class.
Definition: Types.h:1442
BiStrides strides() const
Strides vector accessor.
virtual ITensorInfo & set_data_type(DataType data_type)=0
Set the data type to the specified value.
Status validate_dequantization_layer(DequantizationLayerNode &node)
Validates a dequantize layer node.
bool is_data_type_quantized_asymmetric(DataType dt)
Check if a given data type is of asymmetric quantized type.
Definition: Utils.h:1003
Strides of an item in bytes.
Definition: Strides.h:37
Status validate_reduction_operation_layer(ReductionLayerNode &node)
Validates a Reduction operation layer node.
ConvolutionMethod convolution_method() const
Convolution layer method accessor.
PadStrideInfo convolution_info() const
Convolution metadata accessor.
Detection Output layer info.
Definition: Types.h:935
DetectionPostProcess Layer node.
ScaleKernelInfo info(interpolation_policy, default_border_mode, PixelValue(), sampling_policy, false)
const BoundingBoxTransformInfo & info() const
BoundingBoxTransformInfo accessor.
#define ARM_COMPUTE_RETURN_ERROR_MSG(...)
An error is returned with the given description.
Definition: Error.h:194
Status validate_priorbox_layer(PriorBoxLayerNode &node)
Validates a priorbox layer node.
Status validate_quantization_layer(QuantizationLayerNode &node)
Validates a Quantization layer node.
int32_t shrink_axis_mask() const
Definition: Types.h:1716
Status validate_strided_slice_layer(StridedSliceLayerNode &node)
Validates a Strided Slice layer node.
ROI Pooling Layer Information class.
Definition: Types.h:1268
Class for specifying the size of an image or rectangle.
Definition: Size2D.h:34
Status validate_channel_shuffle_layer(ChannelShuffleLayerNode &node)
Validates a Channel Shuffle layer node.
unsigned int num_groups() const
Number of groups in convolution accessor.
#define ARM_COMPUTE_LOG_GRAPH_VERBOSE(x)
Definition: Logger.h:50
ConvolutionMethod
Supported Convolution layer methods.
Definition: Types.h:126
Detection Output layer info.
Definition: Types.h:1054
size_t num_inputs() const
Returns number of inputs of the node.
Definition: INode.cpp:179
ReductionOperation reduction_operation() const
Operator accessor.
StridedSliceLayerInfo strided_slice_info() const
const GenerateProposalsInfo & info() const
GenerateProposalsInfo accessor.
#define ARM_COMPUTE_RETURN_ERROR_ON_MSG(cond, msg)
If the condition is true, an error is returned.
Definition: Error.h:244
ConvertPolicy convert_policy() const
Convert policy accessor.
Default approach using internal heuristics.
Status validate_depthwise_convolution_layer(DepthwiseConvolutionLayerNode &node)
Validates a Depthwise Convolution layer node.
Default approach using internal heuristics.
Status validate_convolution_layer(ConvolutionLayerNode &node)
Validates a Convolution layer node.
unsigned int axis() const
Axis accessor.
Optimized 3x3 direct depthwise convolution.
Tensor * input(size_t idx) const
Returns the tensor of a given input of the node.
Definition: INode.cpp:151
int block_shape() const
Block shape policy accessor.
Convolution node.
Coordinates starts() const
Start coordinates accessor.
ConvertPolicy
Policy to handle integer overflow.
Definition: Types.h:391
Status validate_normalize_planar_yuv_layer(NormalizePlanarYUVLayerNode &node)
Validates a NormalizePlanarYUV layer node.
Status validate_unary_eltwise_layer(UnaryEltwiseLayerNode &node)
Validates a unary element-wise layer node.
PriorBoxLayerInfo priorbox_info() const
PriorBox metadata accessor.
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)
Tensor object.
Definition: Tensor.h:41
UnaryEltwiseOperation
Supported Unary Element-wise operations.
Definition: Types.h:120
Status validate_arg_min_max_layer(ArgMinMaxLayerNode &node)
Validates a ArgMinMax layer node.