ONE - On-device Neural Engine
|
Convert loco::AvgPool2D to locoex::TFLAveragePool2D. More...
#include <AvgPool2DConverter.h>
Public Member Functions | |
const char * | name (void) const final |
bool | convert (loco::AvgPool2D *origin) final |
Converts loco::AvgPool2D to locoex::TFLAveragePool2D. | |
Public Member Functions inherited from exo::CanonicalNodeConverter< loco::AvgPool2D > | |
bool | run (loco::Graph *graph) |
Run the pass. | |
Public Member Functions inherited from logo::Pass | |
virtual | ~Pass ()=default |
Additional Inherited Members |
Convert loco::AvgPool2D to locoex::TFLAveragePool2D.
Definition at line 30 of file AvgPool2DConverter.h.
|
finalvirtual |
Converts loco::AvgPool2D to locoex::TFLAveragePool2D.
How it works: (note: ten->fea means input: tensor, output: feature)
Before: Foo -— FeatureEncode -— AvgPool2D -— FeatureDecode -— Bar ten->ten ten->fea fea->fea fea->ten ten->ten
After: AvgPool2D / Foo – FeatureEncode - FeatureDecode - TFLAvgPool2D - FeatureEncode - FeatureDecode – Bar ten->ten ten->fea fea->ten ten->ten ten->fea fea->ten ten->ten
Implements exo::CanonicalNodeConverter< loco::AvgPool2D >.
Definition at line 45 of file AvgPool2DConverter.cpp.
References loco::Node::graph(), loco::Stride< 2 >::horizontal(), loco::Window< 2 >::horizontal(), loco::AvgPool2D::ifm(), exo::make_feature_decode< FeatureLayout::NHWC >(), exo::make_feature_encode< FeatureLayout::NHWC >(), locoex::NONE, loco::AvgPool2D::pad(), loco::replace(), locoex::SAME, loco::AvgPool2D::stride(), locoex::VALID, locoex::TFLAveragePool2D::value(), loco::Stride< 2 >::vertical(), loco::Window< 2 >::vertical(), loco::AvgPool2D::window(), and loco::Subst< SubstQualifier::Default >::with().
|
inlinefinalvirtual |
Reimplemented from exo::CanonicalNodeConverter< loco::AvgPool2D >.
Definition at line 33 of file AvgPool2DConverter.h.