24.02.1
|
Go to the documentation of this file.
24 #ifndef ARM_COMPUTE_GRAPH_LAYERS_H
25 #define ARM_COMPUTE_GRAPH_LAYERS_H
101 : _accessor(std::move(accessor)), _connection_idx(connection_idx)
114 unsigned int _connection_idx;
127 : _act_info(
act_info), _out_quant_info(std::move(out_quant_info))
136 std::move(_out_quant_info));
140 ActivationLayerInfo _act_info;
159 : _op(op), _axis(axis), _out_data_type(out_data_type), _out_quant_info(std::move(out_quant_info))
174 std::move(_out_quant_info));
201 : _mean(std::move(mean)),
202 _var(std::move(var)),
203 _gamma(std::move(gamma)),
204 _beta(std::move(beta)),
217 std::move(_var), std::move(_beta), std::move(_gamma));
241 : _ss_input(sub_stream_input), _ss_deltas(sub_stream_deltas), _bbox_info(
info)
285 unsigned int _num_groups;
298 template <
typename... Ts>
302 _sub_streams.push_back(std::make_unique<SubStream>(std::move(sub_stream1)));
303 _sub_streams.push_back(std::make_unique<SubStream>(std::move(sub_stream2)));
306 { _sub_streams.push_back(std::make_unique<SubStream>(std::move(sub_stream))); },
307 std::move(rest_sub_streams)...);
316 template <
typename... Ts>
320 Ts &&...rest_sub_streams)
321 : _sub_streams(), _concat_descriptor(concat_descriptor)
323 _sub_streams.push_back(std::make_unique<SubStream>(std::move(sub_stream1)));
324 _sub_streams.push_back(std::make_unique<SubStream>(std::move(sub_stream2)));
327 { _sub_streams.push_back(std::make_unique<SubStream>(std::move(sub_stream))); },
328 std::move(rest_sub_streams)...);
334 template <
typename... Ts>
337 _sub_streams.push_back(std::make_unique<SubStream>(std::move(sub_stream)));
343 if (_sub_streams.size() == 1 && _sub_streams.at(0) !=
nullptr)
345 nid = _sub_streams[0]->tail_node();
350 std::vector<NodeIdxPair> nodes;
351 for (
auto &
ss : _sub_streams)
355 const auto tail_node = s.
graph().
node(
ss->tail_node());
358 nodes.push_back({
ss->tail_node(), 0});
368 std::vector<std::unique_ptr<SubStream>> _sub_streams;
389 unsigned int conv_height,
397 : _conv_width(conv_width),
398 _conv_height(conv_height),
402 _weights(std::move(weights)),
403 _bias(std::move(
bias)),
404 _weights_quant_info(std::move(weights_quant_info)),
405 _out_quant_info(std::move(out_quant_info))
416 std::move(_weights_quant_info), std::move(_out_quant_info));
420 unsigned int _conv_width;
421 unsigned int _conv_height;
423 const PadStrideInfo _conv_info;
424 unsigned int _num_groups;
445 unsigned int conv_height,
449 PadStrideInfo deconv_info)
450 : _conv_width(conv_width),
451 _conv_height(conv_height),
453 _deconv_info(std::move(deconv_info)),
454 _weights(std::move(weights)),
455 _bias(std::move(
bias))
464 _ofm, _deconv_info, std::move(_weights), std::move(_bias));
468 unsigned int _conv_width;
469 unsigned int _conv_height;
471 const PadStrideInfo _deconv_info;
492 unsigned int conv_height,
496 int depth_multiplier = 1,
499 : _conv_width(conv_width),
500 _conv_height(conv_height),
502 _weights(std::move(weights)),
503 _bias(std::move(
bias)),
504 _depth_multiplier(depth_multiplier),
505 _weights_quant_info(std::move(weights_quant_info)),
506 _out_quant_info(std::move(out_quant_info))
515 s.
graph(), common_params,
input, Size2D(_conv_width, _conv_height), _conv_info, _depth_multiplier,
517 std::move(_weights_quant_info), std::move(_out_quant_info));
521 unsigned int _conv_width;
522 unsigned int _conv_height;
523 const PadStrideInfo _conv_info;
526 int _depth_multiplier;
551 int32_t _block_shape;
586 : _ss_conf(std::move(sub_stream_conf)), _ss_prior(std::move(sub_stream_prior)), _detect_info(detect_info)
620 : _sub_stream_class_prediction(std::move(sub_stream_class_prediction)),
621 _detect_info(detect_info),
622 _anchors(std::move(anchors)),
623 _out_quant_info(std::move(out_quant_info))
635 input_class_prediction, _detect_info, std::move(_anchors),
636 std::move(_out_quant_info));
678 : _ss0(std::move(sub_stream0)), _ss1(std::move(sub_stream1)), _op(op)
729 const FullyConnectedLayerInfo fc_info = FullyConnectedLayerInfo(),
732 : _num_outputs(num_outputs),
733 _weights(std::move(weights)),
734 _bias(std::move(
bias)),
735 _weights_ss(nullptr),
738 _weights_quant_info(std::move(weights_quant_info)),
739 _out_quant_info(std::move(out_quant_info))
755 const FullyConnectedLayerInfo fc_info = FullyConnectedLayerInfo(),
758 : _num_outputs(num_outputs),
761 _weights_ss(std::make_unique<
SubStream>(std::move(sub_stream_weights))),
762 _bias_ss(std::make_unique<
SubStream>(std::move(sub_stream_bias))),
764 _weights_quant_info(std::move(weights_quant_info)),
765 _out_quant_info(std::move(out_quant_info))
779 if (_weights !=
nullptr)
782 s.
graph(), common_params,
input, _num_outputs, std::move(_weights), std::move(_bias), _fc_info,
791 _weights_ss->tail_node(), bias_nid, _fc_info,
797 unsigned int _num_outputs;
800 std::unique_ptr<SubStream> _weights_ss;
801 std::unique_ptr<SubStream> _bias_ss;
802 const FullyConnectedLayerInfo _fc_info;
822 : _ss_scores(std::move(ss_scores)),
823 _ss_deltas(std::move(ss_deltas)),
824 _ss_anchors(std::move(ss_anchors)),
896 NormalizationLayerInfo _norm_info;
909 : _mean(std::move(mean)), _std(std::move(std))
1001 PoolingLayerInfo _pool_info;
1014 : _ss0(std::move(sub_stream0)), _ss1(std::move(sub_stream1))
1074 : _stream(stream), _format_info(format_info), _transform(transform)
1086 std::ostream &_stream;
1101 : _ss(std::move(sub_stream)), _prior_info(prior_info)
1152 : _op(op), _axis(axis), _keep_dims(keep_dims)
1221 : _policy(policy), _width_scale(width_scale), _height_scale(height_scale)
1235 float _height_scale;
1249 : _ss_input(sub_stream_input), _ss_rois(sub_stream_rois), _pool_info(pool_info)
1282 : _mul_w(std::move(mul_w)), _add_w(std::move(add_w))
1356 template <
typename... Ts>
1359 _sub_streams.push_back(std::make_unique<SubStream>(std::move(sub_stream1)));
1360 _sub_streams.push_back(std::make_unique<SubStream>(std::move(sub_stream2)));
1363 { _sub_streams.push_back(std::make_unique<SubStream>(std::move(sub_stream))); },
1364 std::move(rest_sub_streams)...);
1373 template <
typename... Ts>
1375 : _sub_streams(), _axis(axis)
1377 _sub_streams.push_back(std::make_unique<SubStream>(std::move(sub_stream1)));
1378 _sub_streams.push_back(std::make_unique<SubStream>(std::move(sub_stream2)));
1381 { _sub_streams.push_back(std::make_unique<SubStream>(std::move(sub_stream))); },
1382 std::move(rest_sub_streams)...);
1388 template <
typename... Ts>
1391 _sub_streams.push_back(std::make_unique<SubStream>(std::move(sub_stream)));
1397 if (_sub_streams.size() == 1 && _sub_streams.at(0) !=
nullptr)
1399 nid = _sub_streams[0]->tail_node();
1404 std::vector<NodeIdxPair> nodes;
1405 for (
auto &
ss : _sub_streams)
1409 const auto tail_node = s.
graph().
node(
ss->tail_node());
1412 nodes.push_back({
ss->tail_node(), 0});
1422 std::vector<std::unique_ptr<SubStream>> _sub_streams;
1441 : _starts(starts), _ends(ends), _strides(strides), _info(strided_slice_info)
1479 ActivationLayerInfo _act_info;
NodeID create_layer(IStream &s) override
Create layer and add to the given stream.
NodeID create_layer(IStream &s) override
Create layer and add to the given stream.
static NodeID add_activation_node(Graph &g, NodeParams params, NodeIdxPair input, ActivationLayerInfo act_info, const QuantizationInfo &out_quant_info=QuantizationInfo())
Adds an activation layer node to the graph.
static NodeID add_flatten_node(Graph &g, NodeParams params, NodeIdxPair input)
Adds a flatten layer node to the graph.
static NodeID add_permute_node(Graph &g, NodeParams params, NodeIdxPair input, PermutationVector perm, DataLayout layout=DataLayout::UNKNOWN)
Adds a permute layer node to the graph.
static NodeID add_depthwise_convolution_node(Graph &g, NodeParams params, NodeIdxPair input, Size2D kernel_spatial_extend, PadStrideInfo conv_info, int depth_multiplier=1, DepthwiseConvolutionMethod method=DepthwiseConvolutionMethod::Default, ITensorAccessorUPtr weights_accessor=nullptr, ITensorAccessorUPtr bias_accessor=nullptr, const QuantizationInfo &quant_info=QuantizationInfo(), const QuantizationInfo &out_quant_info=QuantizationInfo())
Adds a depth-wise convolution layer node to the graph.
NodeID create_layer(IStream &s) override
Create layer and add to the given stream.
ReorgLayer(int stride)
Construct a reorg layer.
DepthwiseConvolutionMethod depthwise_convolution_method_hint
Depthwise Convolution method hint.
static NodeID add_yolo_node(Graph &g, NodeParams params, NodeIdxPair input, ActivationLayerInfo act_info)
Adds a yolo layer to the graph.
Quantization information.
Class describing the value of a pixel for any image format.
std::vector< PaddingInfo > PaddingList
List of padding information.
Generate Proposals Layer.
DataLayout
[DataLayout enum definition]
NodeID create_layer(IStream &s) override
Create layer and add to the given stream.
ConcatLayer(SubStream &&sub_stream)
Construct a concat layer.
static NodeID add_quantization_node(Graph &g, NodeParams params, NodeIdxPair input, const QuantizationInfo &out_quant_info)
Adds a quantization layer node to the graph.
static NodeID add_resize_node(Graph &g, NodeParams params, NodeIdxPair input, InterpolationPolicy policy, float width_scale, float height_scale)
Adds a resize layer node to the graph.
DataLayoutDimension
[DataLayout enum definition]
NodeID create_layer(IStream &s) override
Create layer and add to the given stream.
NormalizePlanarYUVLayer(ITensorAccessorUPtr mean, ITensorAccessorUPtr std)
Construct a normalize planar YUV layer.
NodeID create_layer(IStream &s) override
Create layer and add to the given stream.
DetectionOutputPostProcess Layer.
static NodeID add_concatenate_node(Graph &g, NodeParams params, const std::vector< NodeIdxPair > &inputs, const descriptors::ConcatLayerDescriptor &concat_descriptor)
Adds a depth concatenate node to the graph.
static NodeID add_input_node(Graph &g, NodeParams params, const TensorDescriptor &desc, ITensorAccessorUPtr accessor=nullptr)
Adds an input layer node to the graph.
Depthwise Convolution Layer.
StackLayer(SubStream &&sub_stream)
Construct a concat layer.
static NodeID add_convolution_node(Graph &g, NodeParams params, NodeIdxPair input, Size2D kernel_spatial_extend, unsigned int depth, PadStrideInfo conv_info, unsigned int num_groups=1, ConvolutionMethod method=ConvolutionMethod::Default, FastMathHint fast_math_hint=FastMathHint::Disabled, ITensorAccessorUPtr weights_accessor=nullptr, ITensorAccessorUPtr bias_accessor=nullptr, const QuantizationInfo &weights_quant_info=QuantizationInfo(), const QuantizationInfo &out_quant_info=QuantizationInfo())
Adds a convolution layer node to the graph.
ResizeLayer(InterpolationPolicy policy, float width_scale, float height_scale)
StackLayer(int axis, SubStream &&sub_stream1, SubStream &&sub_stream2, Ts &&...rest_sub_streams)
Construct a concatenation layer.
GenerateProposalsLayer(SubStream &&ss_scores, SubStream &&ss_deltas, SubStream &&ss_anchors, GenerateProposalsInfo info)
Construct a generate proposals layer.
YOLOLayer(ActivationLayerInfo act_info)
Construct a YOLO layer.
InterpolationPolicy
Interpolation method.
ConcatLayer(descriptors::ConcatLayerDescriptor concat_descriptor, SubStream &&sub_stream1, SubStream &&sub_stream2, Ts &&...rest_sub_streams)
Construct a concatenation layer.
static NodeID add_batch_normalization_node(Graph &g, NodeParams params, NodeIdxPair input, float epsilon, ITensorAccessorUPtr mean_accessor=nullptr, ITensorAccessorUPtr var_accessor=nullptr, ITensorAccessorUPtr beta_accessor=nullptr, ITensorAccessorUPtr gamma_accessor=nullptr)
Adds a batch normalization layer node to the graph.
NodeID create_layer(IStream &s) override
Create layer and add to the given stream.
ConstantLayer(TensorDescriptor desc, ITensorAccessorUPtr accessor)
Construct a constant layer.
NodeID create_layer(IStream &s) override
Create layer and add to the given stream.
Interface for CPU tensor.
BatchNormalizationLayer(ITensorAccessorUPtr mean, ITensorAccessorUPtr var, ITensorAccessorUPtr gamma=nullptr, ITensorAccessorUPtr beta=nullptr, float epsilon=0.001f)
Construct a batch normalization layer.
ConvolutionMethod convolution_method_hint
Convolution method hint.
static NodeID add_depth_to_space_node(Graph &g, NodeParams params, NodeIdxPair input, int32_t block_shape)
Adds an depth to space layer node to the graph.
static NodeID add_stack_node(Graph &g, NodeParams params, const std::vector< NodeIdxPair > &inputs, int axis)
Adds a stack layer node to the graph.
PrintLayer(std::ostream &stream, const IOFormatInfo &format_info=IOFormatInfo(), const std::function< ITensor *(ITensor *)> transform=nullptr)
Construct a print layer.
ReductionOperation
Available reduction operations.
DepthToSpaceLayer(int32_t block_shape)
Construct an DepthToSpace layer.
ArgMinMaxLayer(ReductionOperation op, unsigned int axis, DataType out_data_type=DataType::UNKNOWN, const QuantizationInfo out_quant_info=QuantizationInfo())
Construct an activation layer.
static NodeID add_prelu_node(Graph &g, NodeParams params, NodeIdxPair input, NodeIdxPair alpha)
Adds a prelu layer node to the graph.
SoftmaxLayer(float beta=1.0f)
Construct a softmax layer.
FullyConnectedLayer(unsigned int num_outputs, SubStream sub_stream_weights, SubStream sub_stream_bias, const FullyConnectedLayerInfo fc_info=FullyConnectedLayerInfo(), const QuantizationInfo weights_quant_info=QuantizationInfo(), const QuantizationInfo out_quant_info=QuantizationInfo())
Construct a fully connected layer.
NodeID create_layer(IStream &s) override
Create layer and add to the given stream.
Normalize planar YUV Layer.
static NodeID add_normalization_node(Graph &g, NodeParams params, NodeIdxPair input, NormalizationLayerInfo norm_info)
Adds a normalization layer node to the graph.
L2NormalizeLayer(int axis, float epsilon)
Construct a L2 Normalize layer.
SliceLayer(Coordinates &starts, Coordinates &ends)
Construct a slice layer.
static NodeID add_generate_proposals_node(Graph &g, NodeParams params, NodeIdxPair scores, NodeIdxPair deltas, NodeIdxPair anchors, GenerateProposalsInfo info)
Adds a generate proposals layer node to the graph.
NodeID create_layer(IStream &s) override
Create layer and add to the given stream.
const std::string & name() const
Layer name accessor.
StridedSliceLayer(Coordinates &starts, Coordinates &ends, BiStrides &strides, StridedSliceLayerInfo strided_slice_info)
Construct a strided slice layer.
NodeID create_layer(IStream &s) override
Create layer and add to the given stream.
NodeID create_layer(IStream &s) override
Create layer and add to the given stream.
PadLayer(PaddingList padding, PixelValue pad_value=PixelValue())
Construct a pad layer.
Strides PermutationVector
Permutation vector.
NodeID create_layer(IStream &s) override
Create layer and add to the given stream.
NodeID create_layer(IStream &s) override
Create layer and add to the given stream.
#define ARM_COMPUTE_ERROR_ON(cond)
If the condition is true then an error message is printed and an exception thrown.
NodeID create_layer(IStream &s) override
Create layer and add to the given stream.
StackLayer(SubStream &&sub_stream1, SubStream &&sub_stream2, Ts &&...rest_sub_streams)
Construct a concatenation layer.
FlattenLayer()
Construct a flatten layer.
NodeID create_layer(IStream &s) override
Create layer and add to the given stream.
static NodeID add_reorg_node(Graph &g, NodeParams params, NodeIdxPair input, int stride)
Adds a reorg layer node to the graph.
static NodeID add_detection_output_node(Graph &g, NodeParams params, NodeIdxPair input_loc, NodeIdxPair input_conf, NodeIdxPair input_priorbox, const DetectionOutputLayerInfo &detect_info)
Adds a detection output layer node to the graph.
OutputLayer(ITensorAccessorUPtr accessor, unsigned int connection_idx=0)
Construct an output layer.
Concatenate layer descriptor.
std::stringstream ss(mlgo_str)
NodeID create_layer(IStream &s) override
Create layer and add to the given stream.
DummyLayer(TensorShape shape)
Construct a dummy layer.
DequantizationLayer()
Construct a dequantization layer.
static NodeID add_fully_connected_layer(Graph &g, NodeParams params, NodeIdxPair input, unsigned int num_outputs, NodeID weights_nid, NodeID bias_nid=EmptyNodeID, const FullyConnectedLayerInfo fc_info=FullyConnectedLayerInfo(), const QuantizationInfo &out_quant_info=QuantizationInfo(), FastMathHint fast_math_hint=FastMathHint::Disabled)
Adds a fully connected layer node to the graph.
NormalizationLayer(NormalizationLayerInfo norm_info)
Construct a normalization layer.
ScaleLayer(ITensorAccessorUPtr mul_w, ITensorAccessorUPtr add_w)
Construct a scale layer.
static NodeID add_bounding_box_transform_node(Graph &g, NodeParams params, NodeIdxPair input, NodeIdxPair deltas, BoundingBoxTransformInfo info)
Adds a bounding box transform layer node to the graph.
NodeID create_layer(IStream &s) override
Create layer and add to the given stream.
static NodeID add_dummy_node(Graph &g, NodeParams params, NodeIdxPair input, TensorShape shape)
Adds a Dummy node to the graph.
Target target_hint
Target execution hint.
static NodeID add_reshape_node(Graph &g, NodeParams params, NodeIdxPair input, TensorShape shape)
Adds a reshape layer node to the graph.
static NodeID add_roi_align_node(Graph &g, NodeParams params, NodeIdxPair input, NodeIdxPair rois, ROIPoolingLayerInfo pool_info)
Adds a ROI align layer node to the graph.
NodeID create_layer(IStream &s) override
Create layer and add to the given stream.
PReluLayer(SubStream &&sub_stream0, SubStream &&sub_stream1)
Construct an PRelu operation layer.
static NodeID add_priorbox_node(Graph &g, NodeParams params, NodeIdxPair input0, NodeIdxPair input1, const PriorBoxLayerInfo &prior_info)
Adds a priorbox layer node to the graph.
static NodeID add_slice_node(Graph &g, NodeParams params, NodeIdxPair input, Coordinates &starts, Coordinates &ends)
Adds a slice node to the graph.
static NodeID add_deconvolution_node(Graph &g, NodeParams params, NodeIdxPair input, Size2D kernel_spatial_extend, unsigned int depth, PadStrideInfo deconv_info, ITensorAccessorUPtr weights_accessor=nullptr, ITensorAccessorUPtr bias_accessor=nullptr)
Adds a deconvolution layer node to the graph.
NodeID create_layer(IStream &s) override
Create layer and add to the given stream.
static NodeID add_channel_shuffle_node(Graph &g, NodeParams params, NodeIdxPair input, unsigned int num_groups)
Adds an channel shuffle layer node to the graph.
ChannelShuffleLayer(unsigned int num_groups)
Construct a Channel Shuffle layer.
NodeID create_layer(IStream &s) override
Create layer and add to the given stream.
NodeID tail_node()
Returns the tail node of the Stream.
Detection Output layer info.
static NodeID add_elementwise_node(Graph &g, NodeParams params, NodeIdxPair input0, NodeIdxPair input1, EltwiseOperation operation)
Adds an element-wise layer node to the graph.
static NodeID add_pad_node(Graph &g, NodeParams params, NodeIdxPair input, const PaddingList &paddings, PixelValue pad_value=PixelValue())
Adds a pad layer node to the graph.
NodeID create_layer(IStream &s) override
Create layer and add to the given stream.
DetectionOutputLayer(SubStream &&sub_stream_conf, SubStream &&sub_stream_prior, const DetectionOutputLayerInfo &detect_info)
Construct a detection output layer.
NodeID create_layer(IStream &s) override
Create layer and add to the given stream.
NodeID create_layer(IStream &s) override
Create layer and add to the given stream.
static NodeID add_dequantization_node(Graph &g, NodeParams params, NodeIdxPair input)
Adds a dequantization node to the graph.
std::unique_ptr< ITensorAccessor > ITensorAccessorUPtr
static NodeID add_print_node(Graph &g, NodeParams params, NodeIdxPair input, std::ostream &stream, const IOFormatInfo &format_info=IOFormatInfo(), const std::function< ITensor *(ITensor *)> transform=nullptr)
Adds a print layer node to the graph.
static NodeID add_scale_layer(Graph &g, const NodeParams ¶ms, NodeIdxPair input, ITensorAccessorUPtr mul_accessor=nullptr, ITensorAccessorUPtr add_accessor=nullptr)
Adds a scale layer node to the graph This layer computes a product of the input with a scale (read fr...
NodeID create_layer(IStream &s) override
Create layer and add to the given stream.
DepthwiseConvolutionLayer(unsigned int conv_width, unsigned int conv_height, ITensorAccessorUPtr weights, ITensorAccessorUPtr bias, PadStrideInfo conv_info, int depth_multiplier=1, const QuantizationInfo weights_quant_info=QuantizationInfo(), const QuantizationInfo out_quant_info=QuantizationInfo())
Construct a depthwise convolution layer.
FastMathHint fast_math_hint
Fast math hint.
static NodeID add_l2_normalize_node(Graph &g, NodeParams params, NodeIdxPair input, int axis, float epsilon)
Adds a L2 Normalize layer node to the graph.
Detection Output layer info.
NodeID create_layer(IStream &s) override
Create layer and add to the given stream.
ActivationLayer(ActivationLayerInfo act_info, const QuantizationInfo out_quant_info=QuantizationInfo())
Construct an activation layer.
ReshapeLayer(TensorShape shape)
Construct a reshape layer.
NodeID create_layer(IStream &s) override
Create layer and add to the given stream.
Batchnormalization Layer.
const INode * node(NodeID id) const
Get node object given its id.
ROIAlignLayer & operator=(const ROIAlignLayer &)=delete
Prevent instances of this class from being copied.
PriorBoxLayer(SubStream &&sub_stream, const PriorBoxLayerInfo &prior_info)
Construct a priorbox layer.
StreamHints & hints()
Returns the stream hints that are currently used.
EltwiseLayer(SubStream &&sub_stream0, SubStream &&sub_stream1, EltwiseOperation op)
Construct an element-wise operation layer.
const unsigned int num_groups
static NodeID add_normalize_planar_yuv_node(Graph &g, NodeParams params, NodeIdxPair input, ITensorAccessorUPtr mean_accessor=nullptr, ITensorAccessorUPtr std_accessor=nullptr)
Adds a normalize planar YUV layer node to the graph.
static NodeID add_const_node(Graph &g, NodeParams params, const TensorDescriptor &desc, ITensorAccessorUPtr accessor=nullptr)
Adds a Const node to the graph.
NodeID create_layer(IStream &s) override
Create layer and add to the given stream.
DetectionPostProcessLayer(SubStream &&sub_stream_class_prediction, DetectionPostProcessLayerInfo detect_info, ITensorAccessorUPtr anchors, const QuantizationInfo out_quant_info=QuantizationInfo())
Construct a detection output layer.
PermuteLayer(PermutationVector perm, DataLayout layout=DataLayout::UNKNOWN)
Construct a permute layer.
ROIAlignLayer(SubStream &&sub_stream_input, SubStream &&sub_stream_rois, ROIPoolingLayerInfo pool_info)
Construct a RoiAlign layer.
ReductionLayer(ReductionOperation op, unsigned int axis, bool keep_dims)
Construct a reduction layer.
Copyright (c) 2017-2024 Arm Limited.
virtual Graph & graph()=0
Returns the underlying graph.
PoolingLayer(PoolingLayerInfo pool_info)
Construct a pooling layer.
NodeID create_layer(IStream &s) override
Create layer and add to the given stream.
static NodeID add_arg_min_max_node(Graph &g, NodeParams params, NodeIdxPair input, ReductionOperation op, unsigned int axis, DataType out_data_type=DataType::UNKNOWN, const QuantizationInfo &out_quant_info=QuantizationInfo())
Adds an activation layer node to the graph.
static NodeID add_pooling_node(Graph &g, NodeParams params, NodeIdxPair input, PoolingLayerInfo pool_info)
Adds a pooling layer node to the graph.
FullyConnectedLayer(unsigned int num_outputs, ITensorAccessorUPtr weights, ITensorAccessorUPtr bias, const FullyConnectedLayerInfo fc_info=FullyConnectedLayerInfo(), const QuantizationInfo weights_quant_info=QuantizationInfo(), const QuantizationInfo out_quant_info=QuantizationInfo())
Construct a fully connected layer.
static NodeID add_reduction_operation_node(Graph &g, NodeParams params, NodeIdxPair input, ReductionOperation op, int axis, bool keep_dims=true)
Adds a reduction sum layer node to the graph.
static NodeID add_strided_slice_node(Graph &g, NodeParams params, NodeIdxPair input, Coordinates &starts, Coordinates &ends, BiStrides &strides, StridedSliceLayerInfo info)
Adds a strided slice node to the graph.
NodeID create_layer(IStream &s) override
Create layer and add to the given stream.
static NodeID add_detection_post_process_node(Graph &g, NodeParams params, NodeIdxPair input_box_encoding, NodeIdxPair input_class_prediction, const DetectionPostProcessLayerInfo &detect_info, ITensorAccessorUPtr anchors_accessor=nullptr, const QuantizationInfo &anchor_quant_info=QuantizationInfo())
Adds a detection post process layer node to the graph.
NodeID create_layer(IStream &s) override
Create layer and add to the given stream.
@ UNKNOWN
Unknown data layout.
static NodeID add_softmax_node(Graph &g, NodeParams params, NodeIdxPair input, float beta=1.f)
Adds a softmax node to the graph.
NodeID create_layer(IStream &s) override
Create layer and add to the given stream.
DeconvolutionLayer(unsigned int conv_width, unsigned int conv_height, unsigned int ofm, ITensorAccessorUPtr weights, ITensorAccessorUPtr bias, PadStrideInfo deconv_info)
Construct a convolution layer.
NodeID create_layer(IStream &s) override
Create layer and add to the given stream.
ScaleKernelInfo info(interpolation_policy, default_border_mode, PixelValue(), sampling_policy, false)
EltwiseOperation
Supported Element-wise operations.
@ UNKNOWN
Unknown data type.
static NodeID add_output_node(Graph &g, NodeParams params, NodeIdxPair input, ITensorAccessorUPtr accessor=nullptr)
Adds an output layer node to the graph.
NodeID create_layer(IStream &s) override
Create layer and add to the given stream.
void for_each(F &&)
Base case of for_each.
constexpr NodeID EmptyNodeID
Constant EdgeID specifying an equivalent of null edge.
NodeID create_layer(IStream &s) override
Create layer and add to the given stream.
NodeID create_layer(IStream &s) override
Create layer and add to the given stream.
ConvolutionLayer(unsigned int conv_width, unsigned int conv_height, unsigned int ofm, ITensorAccessorUPtr weights, ITensorAccessorUPtr bias, PadStrideInfo conv_info, unsigned int num_groups=1, const QuantizationInfo weights_quant_info=QuantizationInfo(), const QuantizationInfo out_quant_info=QuantizationInfo())
Construct a convolution layer.
ROI Pooling Layer Information class.
DataType
Available data types.
NodeID create_layer(IStream &s) override
Create layer and add to the given stream.
Generate Proposals Information class.
ConcatLayer(SubStream &&sub_stream1, SubStream &&sub_stream2, Ts &&...rest_sub_streams)
Construct a concatenation layer.
QuantizationLayer(QuantizationInfo out_quant_info)
Construct a quantization layer.
NodeID create_layer(IStream &s) override
Create layer and add to the given stream.
NodeID create_layer(IStream &s) override
Create layer and add to the given stream.
NodeID create_layer(IStream &s) override
Create layer and add to the given stream.