23.08
|
Go to the documentation of this file.
24 #ifndef ARM_COMPUTE_GRAPH_LAYERS_H
25 #define ARM_COMPUTE_GRAPH_LAYERS_H
54 : _desc(desc), _accessor(std::move(accessor))
79 : _desc(desc), _accessor(std::move(accessor))
104 : _accessor(std::move(accessor)), _connection_idx(connection_idx)
117 unsigned int _connection_idx;
132 _out_quant_info(std::move(out_quant_info))
144 ActivationLayerInfo _act_info;
165 _out_data_type(out_data_type),
166 _out_quant_info(std::move(out_quant_info))
207 : _mean(std::move(mean)), _var(std::move(var)), _gamma(std::move(gamma)), _beta(std::move(beta)), _epsilon(
epsilon)
219 std::move(_mean), std::move(_var), std::move(_beta), std::move(_gamma));
241 : _ss_input(sub_stream_input), _ss_deltas(sub_stream_deltas), _bbox_info(
info)
286 unsigned int _num_groups;
299 template <
typename... Ts>
303 _sub_streams.push_back(std::make_unique<SubStream>(std::move(sub_stream1)));
304 _sub_streams.push_back(std::make_unique<SubStream>(std::move(sub_stream2)));
308 _sub_streams.push_back(std::make_unique<SubStream>(std::move(sub_stream)));
310 std::move(rest_sub_streams)...);
319 template <
typename... Ts>
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)));
328 _sub_streams.push_back(std::make_unique<SubStream>(std::move(sub_stream)));
330 std::move(rest_sub_streams)...);
336 template <
typename... Ts>
340 _sub_streams.push_back(std::make_unique<SubStream>(std::move(sub_stream)));
346 if(_sub_streams.size() == 1 && _sub_streams.at(0) !=
nullptr)
348 nid = _sub_streams[0]->tail_node();
353 std::vector<NodeIdxPair> nodes;
354 for(
auto &
ss : _sub_streams)
358 const auto tail_node = s.
graph().
node(
ss->tail_node());
361 nodes.push_back({
ss->tail_node(), 0 });
371 std::vector<std::unique_ptr<SubStream>> _sub_streams;
392 unsigned int conv_height,
400 : _conv_width(conv_width),
401 _conv_height(conv_height),
405 _weights(std::move(weights)),
406 _bias(std::move(
bias)),
407 _weights_quant_info(std::move(weights_quant_info)),
408 _out_quant_info(std::move(out_quant_info))
417 Size2D(_conv_width, _conv_height), _ofm, _conv_info, _num_groups,
419 std::move(_weights), std::move(_bias), std::move(_weights_quant_info), std::move(_out_quant_info));
423 unsigned int _conv_width;
424 unsigned int _conv_height;
426 const PadStrideInfo _conv_info;
427 unsigned int _num_groups;
448 unsigned int conv_height,
452 PadStrideInfo deconv_info)
453 : _conv_width(conv_width),
454 _conv_height(conv_height),
456 _deconv_info(std::move(deconv_info)),
457 _weights(std::move(weights)),
458 _bias(std::move(
bias))
467 Size2D(_conv_width, _conv_height), _ofm, _deconv_info,
468 std::move(_weights), std::move(_bias));
472 unsigned int _conv_width;
473 unsigned int _conv_height;
475 const PadStrideInfo _deconv_info;
496 unsigned int conv_height,
500 int depth_multiplier = 1,
503 : _conv_width(conv_width),
504 _conv_height(conv_height),
506 _weights(std::move(weights)),
507 _bias(std::move(
bias)),
508 _depth_multiplier(depth_multiplier),
509 _weights_quant_info(std::move(weights_quant_info)),
510 _out_quant_info(std::move(out_quant_info))
519 input, Size2D(_conv_width, _conv_height), _conv_info, _depth_multiplier,
521 std::move(_weights), std::move(_bias), std::move(_weights_quant_info), std::move(_out_quant_info));
525 unsigned int _conv_width;
526 unsigned int _conv_height;
527 const PadStrideInfo _conv_info;
530 int _depth_multiplier;
544 : _block_shape(block_shape)
556 int32_t _block_shape;
589 : _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)), _detect_info(detect_info), _anchors(std::move(anchors)), _out_quant_info(std::move(out_quant_info))
674 : _ss0(std::move(sub_stream0)), _ss1(std::move(sub_stream1)), _op(op)
725 const FullyConnectedLayerInfo fc_info = FullyConnectedLayerInfo(),
728 : _num_outputs(num_outputs),
729 _weights(std::move(weights)),
730 _bias(std::move(
bias)),
731 _weights_ss(nullptr),
734 _weights_quant_info(std::move(weights_quant_info)),
735 _out_quant_info(std::move(out_quant_info))
751 const FullyConnectedLayerInfo fc_info = FullyConnectedLayerInfo(),
754 : _num_outputs(num_outputs),
757 _weights_ss(std::make_unique<
SubStream>(std::move(sub_stream_weights))),
758 _bias_ss(std::make_unique<
SubStream>(std::move(sub_stream_bias))),
760 _weights_quant_info(std::move(weights_quant_info)),
761 _out_quant_info(std::move(out_quant_info))
775 if(_weights !=
nullptr)
778 std::move(_weights), std::move(_bias), _fc_info,
787 _weights_ss->tail_node(), bias_nid, _fc_info,
793 unsigned int _num_outputs;
796 std::unique_ptr<SubStream> _weights_ss;
797 std::unique_ptr<SubStream> _bias_ss;
798 const FullyConnectedLayerInfo _fc_info;
815 : _ss_scores(std::move(ss_scores)), _ss_deltas(std::move(ss_deltas)), _ss_anchors(std::move(ss_anchors)), _info(
info)
851 : _axis(axis), _epsilon(
epsilon)
876 : _norm_info(norm_info)
888 NormalizationLayerInfo _norm_info;
902 : _mean(std::move(mean)), _std(std::move(std))
914 std::move(_mean), std::move(_std));
933 : _padding(padding), _pad_value(pad_value)
960 : _perm(perm), _layout(layout)
985 : _pool_info(pool_info)
997 PoolingLayerInfo _pool_info;
1010 : _ss0(std::move(sub_stream0)), _ss1(std::move(sub_stream1))
1068 : _stream(stream), _format_info(format_info), _transform(transform)
1080 std::ostream &_stream;
1095 : _ss(std::move(sub_stream)), _prior_info(prior_info)
1121 : _out_quant_info(out_quant_info)
1147 : _op(op), _axis(axis), _keep_dims(keep_dims)
1218 : _policy(policy), _width_scale(width_scale), _height_scale(height_scale)
1232 float _height_scale;
1246 : _ss_input(sub_stream_input), _ss_rois(sub_stream_rois), _pool_info(pool_info)
1280 : _mul_w(std::move(mul_w)), _add_w(std::move(add_w))
1306 : _starts(starts), _ends(ends)
1356 template <
typename... Ts>
1358 : _sub_streams(), _axis(0)
1360 _sub_streams.push_back(std::make_unique<SubStream>(std::move(sub_stream1)));
1361 _sub_streams.push_back(std::make_unique<SubStream>(std::move(sub_stream2)));
1365 _sub_streams.push_back(std::make_unique<SubStream>(std::move(sub_stream)));
1367 std::move(rest_sub_streams)...);
1376 template <
typename... Ts>
1378 : _sub_streams(), _axis(axis)
1380 _sub_streams.push_back(std::make_unique<SubStream>(std::move(sub_stream1)));
1381 _sub_streams.push_back(std::make_unique<SubStream>(std::move(sub_stream2)));
1385 _sub_streams.push_back(std::make_unique<SubStream>(std::move(sub_stream)));
1387 std::move(rest_sub_streams)...);
1393 template <
typename... Ts>
1395 : _sub_streams(), _axis(0)
1397 _sub_streams.push_back(std::make_unique<SubStream>(std::move(sub_stream)));
1403 if(_sub_streams.size() == 1 && _sub_streams.at(0) !=
nullptr)
1405 nid = _sub_streams[0]->tail_node();
1410 std::vector<NodeIdxPair> nodes;
1411 for(
auto &
ss : _sub_streams)
1415 const auto tail_node = s.
graph().
node(
ss->tail_node());
1418 nodes.push_back({
ss->tail_node(), 0 });
1428 std::vector<std::unique_ptr<SubStream>> _sub_streams;
1444 : _starts(starts), _ends(ends), _strides(strides), _info(strided_slice_info)
1483 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)
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.
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.
StackLayer(int axis, SubStream &&sub_stream1, SubStream &&sub_stream2, Ts &&... rest_sub_streams)
Construct a concatenation 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.
StackLayer(SubStream &&sub_stream1, SubStream &&sub_stream2, Ts &&... rest_sub_streams)
Construct a concatenation layer.
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.
ConcatLayer(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.
ConcatLayer(descriptors::ConcatLayerDescriptor concat_descriptor, SubStream &&sub_stream1, SubStream &&sub_stream2, Ts &&... rest_sub_streams)
Construct a concatenation 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-2023 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.
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.