Compute Library
 21.02
ValidateHelpers.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2018-2020 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 Depthwise Convolution layer node
187  *
188  * @tparam DepthwiseConvolutionLayer Default Depthwise Convolution layer type
189  *
190  * @param[in] node Node to validate
191  *
192  * @return Status
193  */
194 template <typename DepthwiseConvolutionLayer>
196 {
197  ARM_COMPUTE_LOG_GRAPH_VERBOSE("Validating DepthwiseConvolutionLayer node with ID : " << node.id() << " and Name: " << node.name() << std::endl);
200 
201  // Extract IO and info
206 
208  const DepthwiseConvolutionMethod dwc_algorithm = node.depthwise_convolution_method();
209  const int depth_multiplier = node.depth_multiplier();
210 
211  // Validate function
212  Status status{};
213  switch(dwc_algorithm)
214  {
217  status = DepthwiseConvolutionLayer::validate(input, weights, biases, output, conv_info, depth_multiplier);
218  break;
219  default:
220  ARM_COMPUTE_RETURN_ERROR_MSG("Unsupported depthwise convolution method");
221  }
222 
223  return status;
224 }
225 /** Validates a depth to space layer node
226  *
227  * @tparam DequantizationLayer Dequantize layer type
228  *
229  * @param[in] node Node to validate
230  *
231  * @return Status
232  */
233 template <typename DepthToSpaceLayer>
235 {
236  ARM_COMPUTE_LOG_GRAPH_VERBOSE("Validating DetectionOutputLayer node with ID : " << node.id() << " and Name: " << node.name() << std::endl);
239 
240  // Extract IO and info
243 
244  return DepthToSpaceLayer::validate(input, output, node.block_shape());
245 }
246 /** Validates a dequantize layer node
247  *
248  * @tparam DequantizationLayer Dequantize layer type
249  *
250  * @param[in] node Node to validate
251  *
252  * @return Status
253  */
254 template <typename DequantizationLayer>
256 {
257  ARM_COMPUTE_LOG_GRAPH_VERBOSE("Validating DetectionOutputLayer node with ID : " << node.id() << " and Name: " << node.name() << std::endl);
260 
261  // Extract IO and info
264 
265  return DequantizationLayer::validate(input, output);
266 }
267 /** Validates a detection output layer node
268  *
269  * @tparam DetectionOutputLayer DetectionOutput layer type
270  *
271  * @param[in] node Node to validate
272  *
273  * @return Status
274  */
275 template <typename DetectionOutputLayer>
277 {
278  ARM_COMPUTE_LOG_GRAPH_VERBOSE("Validating DetectionOutputLayer node with ID : " << node.id() << " and Name: " << node.name() << std::endl);
281 
282  // Extract IO and info
287  const DetectionOutputLayerInfo detect_info = node.detection_output_info();
288 
289  return DetectionOutputLayer::validate(input0, input1, input2, output, detect_info);
290 }
291 /** Validates a detection post process layer node
292  *
293  * @tparam DetectionPostProcessLayer DetectionOutput layer type
294  *
295  * @param[in] node Node to validate
296  *
297  * @return Status
298  */
299 template <typename DetectionPostProcessLayer>
301 {
302  ARM_COMPUTE_LOG_GRAPH_VERBOSE("Validating DetectionPostProcessLayer node with ID : " << node.id() << " and Name: " << node.name() << std::endl);
305 
306  // Extract IO and info
315 
316  return DetectionPostProcessLayer::validate(input0, input1, input2, output0, output1, output2, output3, detect_info);
317 }
318 
319 /** Validates a Generate Proposals layer node
320  *
321  * @tparam GenerateProposalsLayer Generate Proposals layer type
322  *
323  * @param[in] node Node to validate
324  *
325  * @return Status
326  */
327 template <typename GenerateProposalsLayer>
329 {
330  ARM_COMPUTE_LOG_GRAPH_VERBOSE("Validating GenerateProposalsLayer node with ID : " << node.id() << " and Name: " << node.name() << std::endl);
333 
334  // Extract IO and info
340  arm_compute::ITensorInfo *num_valid_proposals = get_backing_tensor_info(node.output(2));
341  const GenerateProposalsInfo info = node.info();
342 
343  return GenerateProposalsLayer::validate(scores, deltas, anchors, proposals, scores_out, num_valid_proposals, info);
344 }
345 
346 /** Validates a L2Normalization layer node
347  *
348  * @tparam L2Normalization layer type
349  *
350  * @param[in] node Node to validate
351  *
352  * @return Status
353  */
354 template <typename L2NormalizeLayer>
356 {
357  ARM_COMPUTE_LOG_GRAPH_VERBOSE("Validating L2NormalizeLayerNode node with ID : " << node.id() << " and Name: " << node.name() << std::endl);
360 
361  // Extract IO and info
364  int axis = node.axis();
365  float epsilon = node.epsilon();
366 
367  // Validate function
368  return L2NormalizeLayer::validate(input, output, axis, epsilon);
369 }
370 
371 /** Validates a NormalizePlanarYUV layer node
372  *
373  * @tparam NormalizePlanarYUVLayer layer type
374  *
375  * @param[in] node Node to validate
376  *
377  * @return Status
378  */
379 template <typename NormalizePlanarYUVLayer>
381 {
382  ARM_COMPUTE_LOG_GRAPH_VERBOSE("Validating NormalizePlanarYUVLayer node with ID : " << node.id() << " and Name: " << node.name() << std::endl);
385 
386  // Extract IO and info
391 
392  // Validate function
393  return NormalizePlanarYUVLayer::validate(input, output, mean, std);
394 }
395 
396 /** Validates a pad layer node
397  *
398  * @tparam PadLayer Pad layer type
399  *
400  * @param[in] node Node to validate
401  *
402  * @return Status
403  */
404 template <typename PadLayer>
406 {
407  ARM_COMPUTE_LOG_GRAPH_VERBOSE("Validating PadLayer node with ID : " << node.id() << " and Name: " << node.name() << std::endl);
410 
411  // Extract IO and info
414  const PaddingList &padding = node.padding();
415 
416  return PadLayer::validate(input, output, padding);
417 }
418 
419 /** Validates a permute layer node
420  *
421  * @tparam PermuteLayer Permute layer type
422  *
423  * @param[in] node Node to validate
424  *
425  * @return Status
426  */
427 template <typename PermuteLayer>
429 {
430  ARM_COMPUTE_LOG_GRAPH_VERBOSE("Validating PermuteLayer node with ID : " << node.id() << " and Name: " << node.name() << std::endl);
433 
434  // Extract IO and info
437  const PermutationVector &perm = node.permutation_vector();
438 
439  return PermuteLayer::validate(input, output, perm);
440 }
441 
442 /** Validates a PRelu layer node
443  *
444  * @tparam PReluLayer PRelu layer type
445  *
446  * @param[in] node Node to validate
447  *
448  * @return Status
449  */
450 template <typename PReluLayer>
452 {
453  ARM_COMPUTE_LOG_GRAPH_VERBOSE("Validating PRelu node with ID : " << node.id() << " and Name: " << node.name() << std::endl);
456 
457  // Extract IO and info
461 
462  return PReluLayer::validate(input, alpha, output);
463 }
464 
465 /** Validates a priorbox layer node
466  *
467  * @tparam PriorBoxLayer PriorBox layer type
468  *
469  * @param[in] node Node to validate
470  *
471  * @return Status
472  */
473 template <typename PriorBoxLayer>
475 {
476  ARM_COMPUTE_LOG_GRAPH_VERBOSE("Validating PriorBoxLayer node with ID : " << node.id() << " and Name: " << node.name() << std::endl);
479 
480  // Extract IO and info
484  const PriorBoxLayerInfo prior_info = node.priorbox_info();
485 
486  return PriorBoxLayer::validate(input0, input1, output, prior_info);
487 }
488 
489 /** Validates a Quantization layer node
490  *
491  * @tparam QuantizationLayer Quantization layer type
492  *
493  * @param[in] node Node to validate
494  *
495  * @return Status
496  */
497 template <typename QuantizationLayer>
499 {
500  ARM_COMPUTE_LOG_GRAPH_VERBOSE("Validating QuantizationLayer node with ID : " << node.id() << " and Name: " << node.name() << std::endl);
503 
504  // Extract input and output
507 
508  // Validate function
509  return QuantizationLayer::validate(input, output);
510 }
511 
512 /** Validates a Reduction operation layer node
513  *
514  * @tparam ReductionLayer Reduction layer type
515  *
516  * @param[in] node Node to validate
517  *
518  * @return Status
519  */
520 template <typename ReductionLayer>
522 {
523  ARM_COMPUTE_LOG_GRAPH_VERBOSE("Validating ReductionLayer node with ID : " << node.id() << " and Name: " << node.name() << std::endl);
524 
527 
528  // Extract input and output
531 
532  // Validate function
533  return ReductionLayer::validate(input, output, node.axis(), node.op(), node.keep_dims());
534 }
535 
536 /** Validates a Reorg layer node
537  *
538  * @tparam ReorgLayer Reorg layer type
539  *
540  * @param[in] node Node to validate
541  *
542  * @return Status
543  */
544 template <typename ReorgLayer>
546 {
547  ARM_COMPUTE_LOG_GRAPH_VERBOSE("Validating ReorgLayer node with ID : " << node.id() << " and Name: " << node.name() << std::endl);
550 
551  // Extract input and output
554 
555  // Validate function
556  return ReorgLayer::validate(input, output, node.stride());
557 }
558 
559 /** Validates a Reshape layer node
560  *
561  * @tparam ReshapeLayer Reshape layer type
562  *
563  * @param[in] node Node to validate
564  *
565  * @return Status
566  */
567 template <typename ReshapeLayer>
569 {
570  ARM_COMPUTE_LOG_GRAPH_VERBOSE("Validating ReshapeLayer node with ID : " << node.id() << " and Name: " << node.name() << std::endl);
573 
574  // Extract input and output
577 
578  // Validate function
579  return ReshapeLayer::validate(input, output);
580 }
581 
582 /** Validates a ROI Align layer node
583  *
584  * @tparam ROIAlignLayer ROIAlign layer type
585  *
586  * @param[in] node Node to validate
587  *
588  * @return Status
589  */
590 template <typename ROIAlignLayer>
592 {
593  ARM_COMPUTE_LOG_GRAPH_VERBOSE("Validating ROIAlignLayer node with ID : " << node.id() << " and Name: " << node.name() << std::endl);
596 
597  // Extract input and output
601  const ROIPoolingLayerInfo &pool_info = node.pooling_info();
602 
603  // Validate function
604  return ROIAlignLayer::validate(input, rois, output, pool_info);
605 }
606 
607 /** Validates a Slice layer node
608  *
609  * @tparam SliceLayer Slice layer function type
610  *
611  * @param[in] node Node to validate
612  *
613  * @return Status
614  */
615 template <typename SliceLayer>
617 {
618  ARM_COMPUTE_LOG_GRAPH_VERBOSE("Validating Slice node with ID : " << node.id() << " and Name: " << node.name() << std::endl);
621 
622  // Extract IO and info
625  const Coordinates starts = node.starts();
626  const Coordinates ends = node.ends();
627 
628  return SliceLayer::validate(input, output, starts, ends);
629 }
630 
631 /** Validates a Strided Slice layer node
632  *
633  * @tparam StridedSliceLayer Strided Slice layer function type
634  *
635  * @param[in] node Node to validate
636  *
637  * @return Status
638  */
639 template <typename StridedSliceLayer>
641 {
642  ARM_COMPUTE_LOG_GRAPH_VERBOSE("Validating StridedSlice node with ID : " << node.id() << " and Name: " << node.name() << std::endl);
645 
646  // Extract IO and info
649  const Coordinates starts = node.starts();
650  const Coordinates ends = node.ends();
651  const BiStrides strides = node.strides();
653 
654  return StridedSliceLayer::validate(input, output, starts, ends, strides, info.begin_mask(), info.end_mask(), info.shrink_axis_mask());
655 }
656 
657 /** Validates a element-wise layer node
658  *
659  * @param[in] node Node to validate
660  *
661  * @return Status
662  */
663 template <typename EltwiseLayerFunctions>
665 {
666  ARM_COMPUTE_LOG_GRAPH_VERBOSE("Validating EltwiseLayer node with ID : " << node.id() << " and Name: " << node.name() << std::endl);
669 
670  // Extract input and output
674  const EltwiseOperation eltwise_op = node.eltwise_operation();
675  const ConvertPolicy convert_policy = node.convert_policy();
676  const RoundingPolicy round_policy = node.rounding_policy();
677  const ActivationLayerInfo act_info = node.fused_activation();
678  const QuantizationInfo quant_info = node.output_quant_info();
679 
680  // Validate function
681  if(eltwise_op == EltwiseOperation::Add)
682  {
683  return EltwiseLayerFunctions::ArithmeticAddition::validate(input1, input2, output, convert_policy, act_info);
684  }
685  else if(eltwise_op == EltwiseOperation::Sub)
686  {
687  return EltwiseLayerFunctions::ArithmeticSubtraction::validate(input1, input2, output, convert_policy, act_info);
688  }
689  else if(eltwise_op == EltwiseOperation::Mul)
690  {
691  return EltwiseLayerFunctions::PixelWiseMultiplication::validate(input1, input2, output, 1.0f, convert_policy, round_policy, act_info);
692  }
693  else if(eltwise_op == EltwiseOperation::Max)
694  {
695  return EltwiseLayerFunctions::ElementwiseMax::validate(input1, input2, output, act_info);
696  }
697  else
698  {
699  ARM_COMPUTE_ERROR("Unsupported element-wise operation!");
700  }
701  return Status{};
702 }
703 /** Validates a unary element-wise layer node
704  *
705  * @param[in] node Node to validate
706  *
707  * @return Status
708  */
709 template <typename UnaryEltwiseLayerFunctions>
711 {
712  ARM_COMPUTE_LOG_GRAPH_VERBOSE("Validating EltwiseLayer node with ID : " << node.id() << " and Name: " << node.name() << std::endl);
715 
716  // Extract input and output
719  const UnaryEltwiseOperation eltwise_op = node.eltwise_descriptor().op;
720 
721  // Validate function
722  if(eltwise_op == UnaryEltwiseOperation::Exp)
723  {
725  }
726  else
727  {
728  ARM_COMPUTE_ERROR("Unsupported unary element-wise operation!");
729  }
730 
731  return Status{};
732 }
733 } // namespace detail
734 } // namespace backends
735 } // namespace graph
736 } // namespace arm_compute
737 
738 #endif /* ARM_COMPUTE_GRAPH_BACKENDS_DETAIL_VALIDATE_HELPERS_H */
std::string name() const
Returns node&#39;s name.
Definition: INode.cpp:107
Status validate_generate_proposals_layer(GenerateProposalsLayerNode &node)
Validates a Generate Proposals layer node.
Status validate_bounding_box_transform_layer(BoundingBoxTransformLayerNode &node)
Validates a Bounding Box Transform layer node.
Generate Proposals Information class.
Definition: Types.h:1352
EltwiseOperation
Supported Element-wise operations.
Definition: Types.h:103
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:481
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:183
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:1550
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:1765
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:158
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:127
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:102
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:839
PadStrideInfo convolution_info() const
Convolution metadata accessor.
Padding and stride information class.
Definition: Types.h:722
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:1483
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:1190
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.
Detection Output layer info.
Definition: Types.h:976
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:1753
Status validate_strided_slice_layer(StridedSliceLayerNode &node)
Validates a Strided Slice layer node.
ROI Pooling Layer Information class.
Definition: Types.h:1309
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.
#define ARM_COMPUTE_LOG_GRAPH_VERBOSE(x)
Definition: Logger.h:50
ConvolutionMethod
Supported Convolution layer methods.
Definition: Types.h:118
Detection Output layer info.
Definition: Types.h:1095
size_t num_inputs() const
Returns number of inputs of the node.
Definition: INode.cpp:178
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:150
int block_shape() const
Block shape policy accessor.
Coordinates starts() const
Start coordinates accessor.
ConvertPolicy
Policy to handle overflow.
Definition: Types.h:385
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:112
Status validate_arg_min_max_layer(ArgMinMaxLayerNode &node)
Validates a ArgMinMax layer node.