24 #ifndef ACL_ARM_COMPUTE_GRAPH_BACKENDS_FUNCTIONHELPERS_H
25 #define ACL_ARM_COMPUTE_GRAPH_BACKENDS_FUNCTIONHELPERS_H
58 template <
typename TargetInfo>
68 backing_tensor = (tensor_handle !=
nullptr)
69 ? arm_compute::utils::cast::polymorphic_cast<typename TargetInfo::TensorType *>(
74 return backing_tensor;
77 template <
typename TargetInfo>
81 <<
" ID: " << node.
id() << node.
name() << std::endl);
98 template <
typename ActivationLayerFunction,
typename TargetInfo>
101 validate_node<TargetInfo>(node, 1 , 1 );
109 auto func = std::make_unique<ActivationLayerFunction>();
113 "Instantiated " << node.
name() <<
" Type: " << node.
type() <<
" Target: " << TargetInfo::TargetType
114 <<
" Data Type: " <<
input->info()->data_type() <<
" Shape: " <<
input->info()->tensor_shape()
115 <<
" Activation function: " <<
act_info.activation() <<
" a: " <<
act_info.a() <<
" b: "
130 template <
typename ArgMinMaxLayerFunction,
typename TargetInfo>
133 validate_node<TargetInfo>(node, 1 , 1 );
139 unsigned int axis = node.
axis();
142 auto func = std::make_unique<ArgMinMaxLayerFunction>();
143 func->configure(
input, axis, output, op);
146 << TargetInfo::TargetType <<
" Data Type: " <<
input->info()->data_type()
147 <<
" Shape: " <<
input->info()->tensor_shape()
148 <<
" Reduction Operation: " << op <<
" axis: " << axis << std::endl);
162 template <
typename BatchNormalizationLayerFunction,
typename TargetInfo>
165 validate_node<TargetInfo>(node, 5 , 1 );
179 auto func = std::make_unique<BatchNormalizationLayerFunction>();
180 func->configure(
input, output, mean, var, beta, gamma,
epsilon, fused_act);
184 << TargetInfo::TargetType <<
" Data Type: " <<
input->info()->data_type()
185 <<
" Shape: " <<
input->info()->tensor_shape() <<
" Epsilon: " <<
epsilon
202 template <
typename FusedLayerTypes,
typename TargetInfo>
203 std::unique_ptr<IFunction>
206 validate_node<TargetInfo>(node, 7 , 1 );
227 std::unique_ptr<IFunction> func;
228 std::string func_name;
233 std::tie(func, func_name) = create_named_memory_managed_function<FType>(
234 std::string(
"FusedConvolutionBatchNormalizationLayer"), mm,
input, weights, biases, output, mean, var, beta,
239 << node.
name() <<
" Type: " << node.
type() <<
" Target: " << TargetInfo::TargetType
240 <<
" Data Type: " <<
input->info()->data_type() <<
" Input shape: "
241 <<
input->info()->tensor_shape() <<
" Weights shape: " << weights->info()->tensor_shape()
242 <<
" Output shape: " << output->info()->tensor_shape()
257 template <
typename FusedLayerTypes,
typename TargetInfo>
258 std::unique_ptr<IFunction>
262 validate_node<TargetInfo>(node, 7 , 1 );
282 std::unique_ptr<IFunction> func;
283 std::string func_name;
288 std::tie(func, func_name) = create_named_memory_managed_function<FType>(
289 std::string(
"FusedDepthwiseConvolutionBatchNormalizationLayer"), mm,
input, weights, biases, output, mean, var,
294 << node.
name() <<
" Type: " << node.
type() <<
" Target: " << TargetInfo::TargetType
295 <<
" Data Type: " <<
input->info()->data_type() <<
" Input shape: "
296 <<
input->info()->tensor_shape() <<
" Weights shape: " << weights->info()->tensor_shape()
297 <<
" Output shape: " << output->info()->tensor_shape()
311 template <
typename BoundingBoxTransformLayerFunction,
typename TargetInfo>
314 validate_node<TargetInfo>(node, 2 , 1 );
323 auto func = std::make_unique<BoundingBoxTransformLayerFunction>();
324 func->configure(
input, output, deltas, bbox_info);
328 "Instantiated " << node.
name() <<
" Type: " << node.
type() <<
" Target: " << TargetInfo::TargetType
329 <<
" Data Type: " <<
input->info()->data_type() <<
" Shape: " <<
input->info()->tensor_shape()
330 <<
" BoundingBox Info img W: " << bbox_info.
img_width() <<
" "
331 <<
" BoundingBox Info img H: " << bbox_info.
img_height() <<
" " << std::endl);
333 return std::move(func);
345 template <
typename ChannelShuffleLayerFunction,
typename TargetInfo>
348 validate_node<TargetInfo>(node, 1 , 1 );
356 auto func = std::make_unique<ChannelShuffleLayerFunction>();
360 << TargetInfo::TargetType <<
" Data Type: " <<
input->info()->data_type()
361 <<
" Shape: " <<
input->info()->tensor_shape()
362 <<
" Num groups: " <<
num_groups << std::endl);
376 template <
typename ConcatenateLayerFunction,
typename TargetInfo>
390 std::vector<typename TargetInfo::SrcTensorType *> inputs;
391 for (
unsigned int i = 0; i < node.
num_inputs(); ++i)
393 inputs.push_back(get_backing_tensor<TargetInfo>(node.
input(i)));
400 auto func = std::make_unique<ConcatenateLayerFunction>();
401 func->configure(inputs, output, concat_axis);
405 std::ostringstream qss;
408 qss <<
" Output QuantInfo: " << output->info()->quantization_info();
411 "Instantiated " << node.
name() <<
" Type: " << node.
type() <<
" Target: " << TargetInfo::TargetType
412 <<
" Data Type: " << output->info()->data_type() <<
" Shape: " << output->info()->tensor_shape()
413 <<
" Num Inputs: " << inputs.size() <<
" Axis: " << concat_axis << qss.str() << std::endl);
428 template <
typename ConvolutionLayerFunctions,
typename TargetInfo>
431 validate_node<TargetInfo>(node, 3 , 1 );
454 std::unique_ptr<IFunction> func;
455 std::string func_name;
460 std::tie(func, func_name) =
461 create_named_memory_managed_function<typename ConvolutionLayerFunctions::WinogradConvolutionLayer>(
462 std::string(
"WinogradConvolutionLayer"), mm,
input, weights, biases, output,
conv_info, fused_act,
468 std::tie(func, func_name) = create_named_function<typename ConvolutionLayerFunctions::DirectConvolutionLayer>(
469 std::string(
"DirectConvolutionLayer"),
input, weights, biases, output,
conv_info, fused_act);
473 std::tie(func, func_name) =
474 create_named_memory_managed_function<typename ConvolutionLayerFunctions::GEMMConvolutionLayer>(
480 std::tie(func, func_name) =
481 create_named_memory_managed_function<typename ConvolutionLayerFunctions::GenericConvolutionLayer>(
487 std::ostringstream qss;
490 qss <<
" Input QuantInfo: " <<
input->info()->quantization_info()
491 <<
" Weights QuantInfo: " << weights->info()->quantization_info()
492 <<
" Output QuantInfo: " << output->info()->quantization_info();
495 << node.
name() <<
" Type: " << func_name <<
" Target: " << TargetInfo::TargetType
496 <<
" Data Type: " <<
input->info()->data_type() <<
" Groups: " <<
num_groups
497 <<
" Input shape: " <<
input->info()->tensor_shape()
498 <<
" Weights shape: " << weights->info()->tensor_shape()
499 <<
" Output shape: " << output->info()->tensor_shape() << qss.str()
514 template <
typename DeconvolutionLayerFunction,
typename TargetInfo>
517 validate_node<TargetInfo>(node, 3 , 1 );
529 std::unique_ptr<IFunction> func;
531 std::tie(func, std::ignore) = create_named_memory_managed_function<DeconvolutionLayerFunction>(
532 std::string(), mm,
input, weights, biases, output, deconv_info);
536 << TargetInfo::TargetType <<
" Data Type: " <<
input->info()->data_type()
537 <<
" Input shape: " <<
input->info()->tensor_shape()
538 <<
" Weights shape: " << weights->info()->tensor_shape()
539 <<
" Output shape: " << output->info()->tensor_shape() << std::endl);
552 template <
typename DepthwiseConvolutionLayer,
typename TargetInfo>
555 validate_node<TargetInfo>(node, 3 , 1 );
575 std::unique_ptr<IFunction> func;
576 std::string func_name;
578 std::tie(func, func_name) =
579 create_named_function<DepthwiseConvolutionLayer>(std::string(
"DepthwiseConvolutionLayer"),
input, weights,
580 biases, output,
conv_info, depth_multiplier, fused_act);
583 std::ostringstream qss;
586 qss <<
" Input QuantInfo: " <<
input->info()->quantization_info()
587 <<
" Weights QuantInfo: " << weights->info()->quantization_info()
588 <<
" Output QuantInfo: " << output->info()->quantization_info();
591 << node.
name() <<
" Type: " << func_name <<
" Target: " << TargetInfo::TargetType
592 <<
" Data Type: " <<
input->info()->data_type() <<
" Input shape: "
593 <<
input->info()->tensor_shape() <<
" Weights shape: " << weights->info()->tensor_shape()
594 <<
" Output shape: " << output->info()->tensor_shape()
595 <<
" Depth multiplier: " << depth_multiplier << qss.str()
609 template <
typename DepthToSpaceLayerFunction,
typename TargetInfo>
612 validate_node<TargetInfo>(node, 1 , 1 );
622 auto func = std::make_unique<DepthToSpaceLayerFunction>();
627 << TargetInfo::TargetType <<
" Data Type: " <<
input->info()->data_type()
628 <<
" Input shape: " <<
input->info()->tensor_shape()
630 <<
" Output shape: " << output->info()->tensor_shape() << std::endl);
644 template <
typename DequantizationLayerFunction,
typename TargetInfo>
647 validate_node<TargetInfo>(node, 1 , 1 );
657 auto func = std::make_unique<DequantizationLayerFunction>();
658 func->configure(
input, output);
662 << TargetInfo::TargetType <<
" Data Type: " <<
input->info()->data_type()
663 <<
" Input shape: " <<
input->info()->tensor_shape()
664 <<
" Input quantization info: " << output->info()->quantization_info()
665 <<
" Output shape: " << output->info()->tensor_shape() << std::endl);
678 template <
typename DetectionOutputLayerFunction,
typename TargetInfo>
681 validate_node<TargetInfo>(node, 3 , 1 );
696 auto func = std::make_unique<DetectionOutputLayerFunction>();
697 func->configure(input0, input1, input2, output, detect_info);
701 << node.
name() <<
" Type: " << node.
type() <<
" Target: " << TargetInfo::TargetType
702 <<
" Data Type: " << input0->info()->data_type() <<
" Input0 shape: "
703 << input0->info()->tensor_shape() <<
" Input1 shape: " << input1->info()->tensor_shape()
704 <<
" Input2 shape: " << input2->info()->tensor_shape()
705 <<
" Output shape: " << output->info()->tensor_shape()
706 <<
" DetectionOutputLayer info: " << detect_info << std::endl);
720 template <
typename DetectionPostProcessLayerFunction,
typename TargetInfo>
723 validate_node<TargetInfo>(node, 3 , 4 );
744 auto func = std::make_unique<DetectionPostProcessLayerFunction>();
745 func->configure(input0, input1, input2, output0, output1, output2, output3, detect_info);
749 << node.
name() <<
" Type: " << node.
type() <<
" Target: " << TargetInfo::TargetType
750 <<
" Data Type: " << input0->info()->data_type() <<
" Input0 shape: "
751 << input0->info()->tensor_shape() <<
" Input1 shape: " << input1->info()->tensor_shape()
752 <<
" Input2 shape: " << input2->info()->tensor_shape()
753 <<
" Output0 shape: " << output0->info()->tensor_shape()
754 <<
" Output1 shape: " << output1->info()->tensor_shape()
755 <<
" Output2 shape: " << output2->info()->tensor_shape()
756 <<
" Output3 shape: " << output3->info()->tensor_shape()
757 <<
" DetectionPostProcessLayer info: " << detect_info << std::endl);
771 template <
typename EltwiseFunctions,
typename TargetInfo>
774 validate_node<TargetInfo>(node, 2 , 1 );
787 std::unique_ptr<IFunction> func =
nullptr;
788 std::string func_name;
791 std::tie(func, func_name) = create_named_function<typename EltwiseFunctions::Addition>(
792 std::string(
"ArithmeticAddition"), input1, input2, output, convert_policy,
act_info);
796 std::tie(func, func_name) = create_named_function<typename EltwiseFunctions::Subtraction>(
797 std::string(
"ArithmeticSubtraction"), input1, input2, output, convert_policy,
act_info);
801 std::tie(func, func_name) = create_named_function<typename EltwiseFunctions::Multiplication>(
802 std::string(
"PixelWiseMultiplication"), input1, input2, output, 1.f, convert_policy, node.
rounding_policy(),
807 std::tie(func, func_name) = create_named_function<typename EltwiseFunctions::Maximum>(
808 std::string(
"ElementwiseMaximum"), input1, input2, output,
act_info);
812 std::tie(func, func_name) = create_named_function<typename EltwiseFunctions::Division>(
813 std::string(
"ArithmeticDivision"), input1, input2, output,
act_info);
822 <<
" Target: " << TargetInfo::TargetType <<
" Operation: " << func_name
823 <<
" Data Type: " << input1->info()->data_type()
824 <<
" Shape: " << input1->info()->tensor_shape() << std::endl);
838 template <
typename UnaryEltwiseFunctions,
typename TargetInfo>
841 validate_node<TargetInfo>(node, 1 , 1 );
851 std::unique_ptr<IFunction> func =
nullptr;
852 std::string func_name;
855 std::tie(func, func_name) =
856 create_named_function<typename UnaryEltwiseFunctions::Exp>(std::string(
"Exp"),
input, output);
865 <<
" Target: " << TargetInfo::TargetType <<
" Operation: " << func_name
866 <<
" Data Type: " <<
input->info()->data_type()
867 <<
" Shape: " <<
input->info()->tensor_shape() << std::endl);
881 template <
typename FlattenLayerFunction,
typename TargetInfo>
884 validate_node<TargetInfo>(node, 1 , 1 );
894 auto func = std::make_unique<FlattenLayerFunction>();
895 func->configure(
input, output);
899 << TargetInfo::TargetType <<
" Data Type: " <<
input->info()->data_type()
900 <<
" Input shape: " <<
input->info()->tensor_shape()
901 <<
" Output shape: " << output->info()->tensor_shape() << std::endl);
916 template <
typename FullyConnectedLayerFunction,
typename TargetInfo>
919 validate_node<TargetInfo>(node, 3 , 1 );
936 auto func = std::make_unique<FullyConnectedLayerFunction>(mm, wm.get());
937 func->configure(
input, weights, biases, output, fc_info);
942 std::ostringstream qss;
945 qss <<
" Input QuantInfo: " <<
input->info()->quantization_info()
946 <<
" Weights QuantInfo: " << weights->info()->quantization_info()
947 <<
" Output QuantInfo: " << output->info()->quantization_info();
950 << TargetInfo::TargetType <<
" Data Type: " <<
input->info()->data_type()
951 << qss.str() <<
" Input shape: " <<
input->info()->tensor_shape()
952 <<
" Weights shape: " << weights->info()->tensor_shape()
953 <<
" Output shape: " << output->info()->tensor_shape() << std::endl);
968 template <
typename GenerateProposalsLayerFunction,
typename TargetInfo>
971 validate_node<TargetInfo>(node, 3 , 3 );
989 auto func = std::make_unique<GenerateProposalsLayerFunction>(
get_memory_manager(ctx, TargetInfo::TargetType));
990 func->configure(scores, deltas, anchors, proposals, scores_out, num_valid_proposals,
info);
994 << node.
type() <<
" Target " << TargetInfo::TargetType <<
" Data Type: "
995 << scores->info()->data_type() <<
" Scores shape: " << scores->info()->tensor_shape()
996 <<
" Deltas shape: " << deltas->info()->tensor_shape()
997 <<
" Anchors shape: " << anchors->info()->tensor_shape()
998 <<
" Proposals shape: " << proposals->info()->tensor_shape()
999 <<
" Num valid proposals shape: " << num_valid_proposals->info()->tensor_shape()
1000 <<
" Scores Out shape: " << scores_out->info()->tensor_shape() << std::endl);
1002 return std::move(func);
1015 template <
typename L2NormalizeLayerFunction,
typename TargetInfo>
1018 validate_node<TargetInfo>(node, 1 , 1 );
1023 int axis = node.
axis();
1031 auto func = std::make_unique<L2NormalizeLayerFunction>(mm);
1036 << TargetInfo::TargetType <<
" Data Type: " <<
input->info()->data_type()
1037 <<
" Input shape: " <<
input->info()->tensor_shape()
1038 <<
" Output shape: " << output->info()->tensor_shape()
1039 <<
" Axis: " << axis <<
" Epsilon: " <<
epsilon << std::endl);
1054 template <
typename NormalizationLayerFunction,
typename TargetInfo>
1059 validate_node<TargetInfo>(node, 1 , 1 );
1069 auto func = std::make_unique<NormalizationLayerFunction>();
1070 func->configure(
input, output, norm_info);
1074 << TargetInfo::TargetType <<
" Data Type: " <<
input->info()->data_type()
1075 <<
" Input shape: " <<
input->info()->tensor_shape()
1076 <<
" Output shape: " << output->info()->tensor_shape()
1077 <<
" Normalization info: " << norm_info.
type() << std::endl);
1079 return std::move(func);
1091 template <
typename NormalizePlanarYUVLayerFunction,
typename TargetInfo>
1094 validate_node<TargetInfo>(node, 3 , 1 );
1107 auto func = std::make_unique<NormalizePlanarYUVLayerFunction>();
1108 func->configure(
input, output, mean, std);
1112 << TargetInfo::TargetType <<
" Data Type: " <<
input->info()->data_type()
1113 <<
" Shape: " <<
input->info()->tensor_shape() << std::endl);
1115 return std::move(func);
1127 template <
typename PadLayerFunction,
typename TargetInfo>
1130 validate_node<TargetInfo>(node, 1 , 1 );
1141 auto func = std::make_unique<PadLayerFunction>();
1142 func->configure(
input, output, padding, pad_value);
1146 << TargetInfo::TargetType <<
" Data Type: " <<
input->info()->data_type()
1147 <<
" Input shape: " <<
input->info()->tensor_shape()
1148 <<
" Output shape: " << output->info()->tensor_shape() << std::endl);
1162 template <
typename PermuteLayerFunction,
typename TargetInfo>
1165 validate_node<TargetInfo>(node, 1 , 1 );
1175 auto func = std::make_unique<PermuteLayerFunction>();
1176 func->configure(
input, output, perm);
1180 << TargetInfo::TargetType <<
" Data Type: " <<
input->info()->data_type()
1181 <<
" Input shape: " <<
input->info()->tensor_shape()
1182 <<
" Output shape: " << output->info()->tensor_shape()
1183 <<
" Permutation vector: " << perm << std::endl);
1197 template <
typename PoolingLayerFunction,
typename TargetInfo>
1200 validate_node<TargetInfo>(node, 1 , 1 );
1210 auto func = std::make_unique<PoolingLayerFunction>();
1211 func->configure(
input, output, pool_info);
1215 << TargetInfo::TargetType <<
" Data Type: " <<
input->info()->data_type()
1216 <<
" Input shape: " <<
input->info()->tensor_shape()
1217 <<
" Output shape: " << output->info()->tensor_shape()
1218 <<
" Pooling info: " << pool_info.
pool_type << std::endl);
1232 template <
typename PReluFunction,
typename TargetInfo>
1235 validate_node<TargetInfo>(node, 2 , 1 );
1245 auto func = std::make_unique<PReluFunction>();
1246 func->configure(
input, alpha, output);
1250 << TargetInfo::TargetType <<
" Data Type: " <<
input->info()->data_type()
1251 <<
" Input shape: " <<
input->info()->tensor_shape()
1252 <<
" Output shape: " << output->info()->tensor_shape() << std::endl);
1265 template <
typename TargetInfo>
1268 validate_node<TargetInfo>(node, 1 , 1 );
1276 << TargetInfo::TargetType <<
" Data Type: " <<
input->info()->data_type()
1277 <<
" Input shape: " <<
input->info()->tensor_shape() << std::endl);
1291 template <
typename PriorBoxLayerFunction,
typename TargetInfo>
1294 validate_node<TargetInfo>(node, 2 , 1 );
1306 auto func = std::make_unique<PriorBoxLayerFunction>();
1307 func->configure(input0, input1, output, prior_info);
1311 << node.
name() <<
" Type: " << node.
type() <<
" Target: " << TargetInfo::TargetType
1312 <<
" Data Type: " << input0->info()->data_type() <<
" Input0 shape: "
1313 << input0->info()->tensor_shape() <<
" Input1 shape: " << input1->info()->tensor_shape()
1314 <<
" Output shape: " << output->info()->tensor_shape()
1315 <<
" PriorBoxLayer info: " << prior_info << std::endl);
1329 template <
typename QuantizationLayerFunction,
typename TargetInfo>
1332 validate_node<TargetInfo>(node, 1 , 1 );
1341 auto func = std::make_unique<QuantizationLayerFunction>();
1342 func->configure(
input, output);
1346 << TargetInfo::TargetType <<
" Data Type: " <<
input->info()->data_type()
1347 <<
" Input shape: " <<
input->info()->tensor_shape()
1348 <<
" Output shape: " << output->info()->tensor_shape() << std::endl);
1363 template <
typename ReductionOperationFunction,
typename TargetInfo>
1366 validate_node<TargetInfo>(node, 1 , 1 );
1372 int axis = node.
axis();
1378 auto func = std::make_unique<ReductionOperationFunction>(
get_memory_manager(ctx, TargetInfo::TargetType));
1379 func->configure(
input, output, axis, op, keep_dims);
1383 << node.
name() <<
" Type: " << node.
type() <<
" Target: " << TargetInfo::TargetType
1384 <<
" Data Type: " <<
input->info()->data_type()
1385 <<
" Input shape: " <<
input->info()->tensor_shape()
1386 <<
" Output shape: " << output->info()->tensor_shape() <<
" Operation: " << op
1387 <<
" Axis: " << axis <<
" Keep dimensions:" << keep_dims << std::endl);
1401 template <
typename ReorgLayerFunction,
typename TargetInfo>
1404 validate_node<TargetInfo>(node, 1 , 1 );
1413 auto func = std::make_unique<ReorgLayerFunction>();
1418 << TargetInfo::TargetType <<
" Data Type: " <<
input->info()->data_type()
1419 <<
" Input shape: " <<
input->info()->tensor_shape()
1420 <<
" Output shape: " << output->info()->tensor_shape() << std::endl);
1434 template <
typename ReshapeLayerFunction,
typename TargetInfo>
1437 validate_node<TargetInfo>(node, 1 , 1 );
1446 auto func = std::make_unique<ReshapeLayerFunction>();
1447 func->configure(
input, output);
1451 << TargetInfo::TargetType <<
" Data Type: " <<
input->info()->data_type()
1452 <<
" Input shape: " <<
input->info()->tensor_shape()
1453 <<
" Output shape: " << output->info()->tensor_shape() << std::endl);
1467 template <
typename ResizeLayerFunction,
typename TargetInfo>
1470 validate_node<TargetInfo>(node, 1 , 1 );
1480 auto func = std::make_unique<ResizeLayerFunction>();
1481 func->configure(
input, output,
1486 << TargetInfo::TargetType <<
" Data Type: " <<
input->info()->data_type()
1487 <<
" Input shape: " <<
input->info()->tensor_shape()
1488 <<
" Output shape: " << output->info()->tensor_shape()
1489 <<
" Interpolation: " << policy << std::endl);
1503 template <
typename ROIAlignLayerFunction,
typename TargetInfo>
1506 validate_node<TargetInfo>(node, 2 , 1 );
1519 auto func = std::make_unique<ROIAlignLayerFunction>();
1521 func->configure(
input, rois, output, pool_info);
1525 << TargetInfo::TargetType <<
" Data Type: " <<
input->info()->data_type()
1526 <<
" Input shape: " <<
input->info()->tensor_shape()
1527 <<
" Output shape: " << output->info()->tensor_shape()
1528 <<
" ROIs shape: " << rois->info()->tensor_shape()
1530 <<
" ROIPooling height: " << pool_info.
pooled_height() << std::endl);
1532 return std::move(func);
1544 template <
typename SliceLayerFunction,
typename TargetInfo>
1547 validate_node<TargetInfo>(node, 1 , 1 );
1556 auto func = std::make_unique<SliceLayerFunction>();
1561 << TargetInfo::TargetType <<
" Data Type: " <<
input->info()->data_type()
1562 <<
" Input shape: " <<
input->info()->tensor_shape()
1563 <<
" Output shape: " << output->info()->tensor_shape() << std::endl);
1578 template <
typename SoftmaxLayerFunction,
typename TargetInfo>
1581 validate_node<TargetInfo>(node, 1 , 1 );
1586 const float beta = node.
beta();
1591 auto func = std::make_unique<SoftmaxLayerFunction>(
get_memory_manager(ctx, TargetInfo::TargetType));
1592 func->configure(
input, output, beta);
1596 << TargetInfo::TargetType <<
" Data Type: " <<
input->info()->data_type()
1597 <<
" Input shape: " <<
input->info()->tensor_shape()
1598 <<
" Output shape: " << output->info()->tensor_shape() << std::endl);
1612 template <
typename StackLayerFunction,
typename TargetInfo>
1620 std::vector<typename TargetInfo::TensorType *> inputs;
1621 for (
unsigned int i = 0; i < node.
num_inputs(); ++i)
1623 inputs.push_back(get_backing_tensor<TargetInfo>(node.
input(i)));
1626 const int axis = node.
axis();
1629 auto func = std::make_unique<StackLayerFunction>();
1630 func->configure(inputs, axis, output);
1634 <<
" Target: " << TargetInfo::TargetType
1635 <<
" Data Type: " << output->info()->data_type()
1636 <<
" Inputs shape: " << inputs[0]->info()->tensor_shape()
1637 <<
" Output shape: " << output->info()->tensor_shape()
1638 <<
" Num Inputs: " << inputs.size() <<
" Axis: " << axis << std::endl);
1652 template <
typename Str
idedSliceLayerFunction,
typename TargetInfo>
1655 validate_node<TargetInfo>(node, 1 , 1 );
1669 auto func = std::make_unique<StridedSliceLayerFunction>();
1670 func->configure(
input, output, starts, ends, strides,
info.begin_mask(),
info.end_mask(),
info.shrink_axis_mask());
1674 << TargetInfo::TargetType <<
" Data Type: " <<
input->info()->data_type()
1675 <<
" Input shape: " <<
input->info()->tensor_shape()
1676 <<
" Output shape: " << output->info()->tensor_shape() << std::endl);
1685 #endif // ACL_ARM_COMPUTE_GRAPH_BACKENDS_FUNCTIONHELPERS_H