ONE - On-device Neural Engine
|
2D Convolution over 3D Feature Map with 4D kernel More...
#include <Ops.h>
Public Member Functions | |
Conv2D () | |
uint32_t | arity (void) const final |
Return the number of arguments (# of child Ops) | |
Op * | arg (uint32_t n) const final |
Return N-th argument. | |
std::set< Object * > | uses (void) const override |
Return a set of object(s) used during execution. | |
Conv2D * | asConv2D (void) override |
const Conv2D * | asConv2D (void) const override |
Instr * | loc (void) override |
Op * | arg (void) const |
void | arg (Op *arg) |
KernelObject * | ker (void) const |
void | ker (KernelObject *ker) |
uint32_t | group (void) const |
Divide an input and kernel (= convolution filter) into G independent groups. | |
void | group (uint32_t g) |
Padding2D * | pad (void) |
const Padding2D * | pad (void) const |
Stride2D * | stride (void) |
const Stride2D * | stride (void) const |
Public Member Functions inherited from coco::Op | |
virtual | ~Op () |
template<typename T > | |
T | accept (IVisitor< T > *v) const |
template<typename T > | |
T | accept (IVisitor< T > &v) const |
template<typename T > | |
T | accept (IVisitor< T > &&v) const |
void | accept (IMutator *m) |
void | accept (IMutator &m) |
void | accept (IMutator &&m) |
Instr * | parent (void) const |
Op * | up (void) const |
Return a pointer to the parent Op. | |
Public Member Functions inherited from coco::Entity | |
virtual | ~Entity ()=default |
Module * | module (void) const |
Public Member Functions inherited from coco::Object::Consumer | |
virtual | ~Consumer ()=default |
Public Member Functions inherited from coco::Bag::Reader | |
virtual | ~Reader ()=default |
Public Member Functions inherited from coco::Locatable | |
virtual | ~Locatable ()=default |
2D Convolution over 3D Feature Map with 4D kernel
NOTE IFM and OFM are implicit. Only 4D kernel is explicit in this class TODO Decide source code layout policy and extract this class if necessary
|
explicit |
Definition at line 24 of file Conv2D.cpp.
|
inline |
|
finalvirtual |
Return N-th argument.
Implements coco::Op.
Referenced by enco::output_shape(), and OpPrinter::visit().
|
inline |
|
finalvirtual |
Return the number of arguments (# of child Ops)
Implements coco::Op.
Definition at line 29 of file Conv2D.cpp.
|
inlineoverride |
|
inlineoverride |
|
inline |
|
inline |
Divide an input and kernel (= convolution filter) into G independent groups.
Given an input of shape(Ic, Ih, Iw), a kernel of shape(Kn, Kc, Kh, Kw), and group G, Conv2D is identical to G independent convolutions over G inputs of shape(Ic / G, Ih, Iw) and a kernel of shape(Kn / G, Kc, Kh, Kw) followed by concatenation.
REQUIRED
NOTE Depthwise convolution is a special case of group convolution where Ic == G.
Definition at line 116 of file Ops.h.
void coco::Conv2D::ker | ( | KernelObject * | ker | ) |
KernelObject * coco::Conv2D::ker | ( | void | ) | const |
Definition at line 64 of file Conv2D.cpp.
References coco::Use::value().
Referenced by tflimport::Conv2DGraphBuilder::build(), tflimport::DepthwiseConv2DGraphBuilder::build(), ker(), enco::output_shape(), uses(), and OpPrinter::visit().
|
inlineoverridevirtual |
|
inline |
Definition at line 120 of file Ops.h.
Referenced by enco::output_shape(), and OpPrinter::visit().
|
inline |
|
inline |
Definition at line 124 of file Ops.h.
Referenced by enco::output_shape(), and OpPrinter::visit().
|
inline |
|
overridevirtual |
Return a set of object(s) used during execution.
NOTE There is no 'def' method as Op is not allowed to define a new object
Implements coco::Op.
Definition at line 42 of file Conv2D.cpp.