ONE - On-device Neural Engine
Loading...
Searching...
No Matches
mir::ops::DepthwiseConv2DOp Class Reference

#include <DepthwiseConv2DOp.h>

Collaboration diagram for mir::ops::DepthwiseConv2DOp:

Public Member Functions

 DepthwiseConv2DOp (Output *input, Output *kernel, const Conv2DOpAttributes &attributes)
 
 DepthwiseConv2DOp (Output *input, Output *kernel, Output *bias, const Conv2DOpAttributes &attributes)
 
OperationcopyWithInputs (const std::vector< Output * > &inputs) override
 
const std::vector< std::int32_t > & getStrides () const
 
const std::vector< std::int32_t > & getPaddingBefore () const
 
const std::vector< std::int32_t > & getPaddingAfter () const
 
DataFormat getDataFormat () const
 
const Conv2DOpAttributesgetAttributes () const
 
- Public Member Functions inherited from mir::Operation
virtual ~Operation ()=default
 
Type getType () const
 
std::size_t getId () const
 
void setId (std::size_t id)
 
std::size_t getNumInputs () const
 
std::size_t getNumOutputs () const
 
std::deque< Output * > & getInputs ()
 
const std::deque< Output * > & getInputs () const
 
std::deque< Output > & getOutputs ()
 
const std::deque< Output > & getOutputs () const
 
OutputgetInput (std::size_t index)
 
const OutputgetInput (std::size_t index) const
 
OutputgetOutput (std::size_t index)
 
const OutputgetOutput (std::size_t index) const
 
const ShapegetInputShape (std::size_t index) const
 
const ShapegetOutputShape (std::size_t index) const
 
void accept (IVisitor *v)
 

Additional Inherited Members

- Public Types inherited from mir::Operation
enum class  Type { HANDLE_OP }
 
- Protected Member Functions inherited from mir::Operation
 Operation (Type type, const std::vector< Output * > &inputs, std::size_t num_outputs=1)
 
void setOutputType (std::size_t index, const TensorType &type)
 

Detailed Description

Definition at line 29 of file DepthwiseConv2DOp.h.

Constructor & Destructor Documentation

◆ DepthwiseConv2DOp() [1/2]

mir::ops::DepthwiseConv2DOp::DepthwiseConv2DOp ( Output input,
Output kernel,
const Conv2DOpAttributes attributes 
)
inline

Definition at line 32 of file DepthwiseConv2DOp.h.

33 : Operation(Type::depthwiseConv, {input, kernel}), _attributes(attributes)
34 {
35 inferOutputTypes();
36 }

◆ DepthwiseConv2DOp() [2/2]

mir::ops::DepthwiseConv2DOp::DepthwiseConv2DOp ( Output input,
Output kernel,
Output bias,
const Conv2DOpAttributes attributes 
)
inline

Definition at line 38 of file DepthwiseConv2DOp.h.

40 : Operation(Type::depthwiseConv, {input, kernel, bias}), _attributes(attributes)
41 {
42 inferOutputTypes();
43 }

Member Function Documentation

◆ copyWithInputs()

Operation * mir::ops::DepthwiseConv2DOp::copyWithInputs ( const std::vector< Output * > &  inputs)
inlineoverridevirtual

Implements mir::Operation.

Definition at line 45 of file DepthwiseConv2DOp.h.

46 {
47 if (inputs.size() == 2)
48 return new DepthwiseConv2DOp(inputs[0], inputs[1], _attributes);
49 else
50 return new DepthwiseConv2DOp(inputs[0], inputs[1], inputs[2], _attributes);
51 }
DepthwiseConv2DOp(Output *input, Output *kernel, const Conv2DOpAttributes &attributes)

◆ getAttributes()

const Conv2DOpAttributes & mir::ops::DepthwiseConv2DOp::getAttributes ( ) const
inline

Definition at line 61 of file DepthwiseConv2DOp.h.

61{ return _attributes; }

◆ getDataFormat()

DataFormat mir::ops::DepthwiseConv2DOp::getDataFormat ( ) const
inline

Definition at line 59 of file DepthwiseConv2DOp.h.

59{ return _attributes.data_format; }

References mir::Conv2DOpAttributes::data_format.

Referenced by mir2loco::Transformer::visit(), and mir::DotNodeBuilder::visit().

◆ getPaddingAfter()

const std::vector< std::int32_t > & mir::ops::DepthwiseConv2DOp::getPaddingAfter ( ) const
inline

Definition at line 57 of file DepthwiseConv2DOp.h.

57{ return _attributes.padding_after; }
std::vector< std::int32_t > padding_after
Definition Attributes.h:33

References mir::Conv2DOpAttributes::padding_after.

Referenced by mir2loco::Transformer::visit(), and mir::DotNodeBuilder::visit().

◆ getPaddingBefore()

const std::vector< std::int32_t > & mir::ops::DepthwiseConv2DOp::getPaddingBefore ( ) const
inline

◆ getStrides()

const std::vector< std::int32_t > & mir::ops::DepthwiseConv2DOp::getStrides ( ) const
inline

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