ONE - On-device Neural Engine
|
BC (Channel-wise Channel-major) Feature Layout. More...
#include <FeatureLayouts.h>
Public Member Functions | |
const FeatureLayout::ID * | id (void) const override |
const FeatureShape & | shape (void) const override |
coco::ElemID | at (uint32_t b, uint32_t ch, uint32_t row, uint32_t col) const override |
Public Member Functions inherited from coco::FeatureLayout | |
virtual | ~FeatureLayout ()=default |
uint32_t | batch (void) const |
uint32_t | depth (void) const |
uint32_t | height (void) const |
uint32_t | width (void) const |
Static Public Member Functions | |
static const FeatureLayout::ID * | uid (void) |
static std::unique_ptr< BC > | create (const nncc::core::ADT::feature::Shape &shape) |
BC (Channel-wise Channel-major) Feature Layout.
A layout is said to be channel-wise if the following holds:
For each pair of valid feature index I and J, at(I) == at(J) if batch(I) == batch(J) and channel(I) == channel(J)
A layout is said to be channel-major if the followings hold:
For each pair of valid feature index I and J, at(I) + 1 == at(J) if batch(I) == batch(J) and channel(I) + 1 == channel(J)
For each pair of valid feature index I and J, at(I) + 1 == at(J) if batch(I) + 1 == batch(J), channel(I) == depth - 1, and channel(J) == 0
Definition at line 101 of file FeatureLayouts.h.
|
overridevirtual |
Implements coco::FeatureLayout.
Definition at line 123 of file FeatureLayouts.cpp.
References coco::FeatureLayout::batch(), nncc::core::ADT::feature::Shape::depth(), offset(), and shape().
|
static |
Definition at line 135 of file FeatureLayouts.cpp.
References shape().
Referenced by caffeimport::BatchNormBuilder::build(), caffeimport::ConvolutionBuilder::build(), caffeimport::ScaleBuilder::build(), tflimport::Conv2DGraphBuilder::build(), and tflimport::DepthwiseConv2DGraphBuilder::build().
|
inlineoverridevirtual |
Implements coco::FeatureLayout.
Definition at line 111 of file FeatureLayouts.h.
References uid().
Referenced by uid().
|
inlineoverridevirtual |
Implements coco::FeatureLayout.
Definition at line 113 of file FeatureLayouts.h.
Referenced by RandomDataGenerator.RandomDataGenerator::_gen_float32(), RandomDataGenerator.RandomDataGenerator::_gen_int16(), RandomDataGenerator.RandomDataGenerator::_gen_uint8(), at(), and create().
|
static |
Definition at line 113 of file FeatureLayouts.cpp.
References id().
Referenced by id().