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

#include <Deconv2DOp.h>

Collaboration diagram for mir::ops::DeConv2DOp:

Public Member Functions

 DeConv2DOp (Output *input, Output *kernel, const Deconv2DOpAttributes &attributes)
 
 DeConv2DOp (Output *input, Output *kernel, const Deconv2DOpAttributes &attributes, const Shape &output_shape)
 
OperationcopyWithInputs (const std::vector< Output * > &inputs) override
 
const std::vector< std::int32_t > & getStrides () const
 
PaddingType getPaddingType () const
 
const std::vector< std::int32_t > & getPaddingBefore () const
 
const std::vector< std::int32_t > & getPaddingAfter () const
 
DataFormat getDataFormat () const
 
const Deconv2DOpAttributesgetAttributes () 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 32 of file Deconv2DOp.h.

Constructor & Destructor Documentation

◆ DeConv2DOp() [1/2]

mir::ops::DeConv2DOp::DeConv2DOp ( Output input,
Output kernel,
const Deconv2DOpAttributes attributes 
)
inline

Definition at line 35 of file Deconv2DOp.h.

36 : Operation(Type::deConv2D, {input, kernel}), _attributes(attributes)
37 {
38 inferOutputTypes();
39 }

◆ DeConv2DOp() [2/2]

mir::ops::DeConv2DOp::DeConv2DOp ( Output input,
Output kernel,
const Deconv2DOpAttributes attributes,
const Shape output_shape 
)
inline

Definition at line 41 of file Deconv2DOp.h.

43 : Operation(Type::deConv2D, {input, kernel}), _attributes(attributes)
44 {
45 assert(input->getElementType() == kernel->getElementType());
46 setOutputType(0, {input->getElementType(), output_shape});
47 inferPaddings();
48 }
void setOutputType(std::size_t index, const TensorType &type)
Definition Operation.h:172
const luci_interpreter::RuntimeShape output_shape

Member Function Documentation

◆ copyWithInputs()

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

Implements mir::Operation.

Definition at line 50 of file Deconv2DOp.h.

51 {
53 return new DeConv2DOp(inputs[0], inputs[1], _attributes);
54 else
55 return new DeConv2DOp(inputs[0], inputs[1], _attributes, getOutputShape(0));
56 }
const Shape & getOutputShape(std::size_t index) const
Definition Operation.h:163
DeConv2DOp(Output *input, Output *kernel, const Deconv2DOpAttributes &attributes)
Definition Deconv2DOp.h:35
PaddingType getPaddingType() const
Definition Deconv2DOp.h:60

References mir::ops::Explicit, mir::Operation::getOutputShape(), and getPaddingType().

◆ getAttributes()

const Deconv2DOpAttributes & mir::ops::DeConv2DOp::getAttributes ( ) const
inline

Definition at line 68 of file Deconv2DOp.h.

68{ return _attributes; }

Referenced by mir_interpreter::MIRInterpreter::visit().

◆ getDataFormat()

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

Definition at line 66 of file Deconv2DOp.h.

66{ return _attributes.data_format; }

References mir::Deconv2DOpAttributes::data_format.

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

◆ getPaddingAfter()

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

Definition at line 64 of file Deconv2DOp.h.

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

References mir::Deconv2DOpAttributes::padding_after.

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

◆ getPaddingBefore()

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

Definition at line 62 of file Deconv2DOp.h.

62{ return _attributes.padding_before; }
std::vector< std::int32_t > padding_before
Definition Attributes.h:66

References mir::Deconv2DOpAttributes::padding_before.

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

◆ getPaddingType()

PaddingType mir::ops::DeConv2DOp::getPaddingType ( ) const
inline

Definition at line 60 of file Deconv2DOp.h.

60{ return _attributes.padding_type; }
ops::PaddingType padding_type
Definition Attributes.h:69

References mir::Deconv2DOpAttributes::padding_type.

Referenced by copyWithInputs(), and mir2loco::Transformer::visit().

◆ getStrides()

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

Definition at line 58 of file Deconv2DOp.h.

58{ return _attributes.strides; }
std::vector< std::int32_t > strides
Definition Attributes.h:65

References mir::Deconv2DOpAttributes::strides.

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


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