ONE - On-device Neural Engine
Loading...
Searching...
No Matches
loco::FeatureEncoder Struct Referenceabstract

Decribe how to build a (convolution) feature map from a tensor. More...

#include <FeatureCodec.h>

Public Member Functions

virtual ~FeatureEncoder ()=default
 
virtual FeatureShape shape (const TensorShape &shape) const =0
 
virtual TensorIndex value (const FeatureIndex &index) const =0
 
virtual std::unique_ptr< FeatureEncoderclone (void) const =0
 

Detailed Description

Decribe how to build a (convolution) feature map from a tensor.

Let us assume that "enc" is a feature encoder.

Given a tensor "inp" and its shape "inp.shape", "enc" builds a feature map "out" as follows:

for each valid feature index (referred to as feature_idx below) for enc.shape(inp.shape) out.at(feature_index) = inp.at(enc.value(feature_index))

Definition at line 44 of file FeatureCodec.h.

Constructor & Destructor Documentation

◆ ~FeatureEncoder()

virtual loco::FeatureEncoder::~FeatureEncoder ( )
virtualdefault

Member Function Documentation

◆ clone()

virtual std::unique_ptr< FeatureEncoder > loco::FeatureEncoder::clone ( void  ) const
pure virtual

◆ shape()

◆ value()

virtual TensorIndex loco::FeatureEncoder::value ( const FeatureIndex index) const
pure virtual

The documentation for this struct was generated from the following file: