Compute Library
DepthwiseConvolutionLayer Class Referencefinal

Depthwise Convolution Layer. More...

#include <Layers.h>

Collaboration diagram for DepthwiseConvolutionLayer:

Public Member Functions

 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. More...
NodeID create_layer (IStream &s) override
 Create layer and add to the given stream. More...
- Public Member Functions inherited from ILayer
virtual ~ILayer ()=default
 Default destructor. More...
ILayerset_name (std::string name)
 Sets the name of the layer. More...
const std::string & name () const
 Layer name accessor. More...

Detailed Description

Depthwise Convolution Layer.

Definition at line 481 of file Layers.h.

Constructor & Destructor Documentation

◆ DepthwiseConvolutionLayer()

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.

[in]conv_widthConvolution width.
[in]conv_heightConvolution height.
[in]weightsAccessor to get kernel weights from.
[in]biasAccessor to get kernel bias from.
[in]conv_infoPadding and stride information.
[in]depth_multiplier(Optional) Depth multiplier parameter.
[in]weights_quant_info(Optional) Quantization info used for weights
[in]out_quant_info(Optional) Output quantization info

Definition at line 495 of file Layers.h.

503  : _conv_width(conv_width),
504  _conv_height(conv_height),
505  _conv_info(std::move(conv_info)),
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))
511  {
512  }
const int32_t * bias

Member Function Documentation

◆ create_layer()

NodeID create_layer ( IStream s)

Create layer and add to the given stream.

[in]sStream to add layer to.
ID of the created node.

Implements ILayer.

Definition at line 514 of file Layers.h.

References GraphBuilder::add_depthwise_convolution_node(), StreamHints::depthwise_convolution_method_hint, IStream::graph(), IStream::hints(), arm_compute::test::validation::input, ILayer::name(), IStream::tail_node(), and StreamHints::target_hint.

515  {
516  NodeIdxPair input = { s.tail_node(), 0 };
517  NodeParams common_params = { name(), s.hints().target_hint };
518  return GraphBuilder::add_depthwise_convolution_node(s.graph(), common_params,
519  input, Size2D(_conv_width, _conv_height), _conv_info, _depth_multiplier,
520  s.hints().depthwise_convolution_method_hint,
521  std::move(_weights), std::move(_bias), std::move(_weights_quant_info), std::move(_out_quant_info));
522  }
const std::string & name() const
Layer name accessor.
Definition: ILayer.h:64
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.

The documentation for this class was generated from the following file: