ONE - On-device Neural Engine
|
Describe how to build a tensor from a matrix. More...
#include <MatrixCodec.h>
Public Member Functions | |
virtual | ~MatrixDecoder ()=default |
virtual TensorShape | shape (const MatrixShape &) const =0 |
virtual MatrixIndex | value (const TensorIndex &) const =0 |
Describe how to build a tensor from a matrix.
Let us assume that "dec" is a matrix decoder.
Given a matrix "inp" and its shape "inp.shape", "dec" builds a tensor "out" as follows:
for each valid tensor index (referred to as tensor_index below) for dec.shape(inp.shape) out.at(tensor_index) = inp.at(dec.value(tensor_index))
NOTE "inp" is a matrix value and "out" is a tensor value in this example.
Definition at line 63 of file MatrixCodec.h.
|
virtualdefault |
|
pure virtual |
|
pure virtual |
Implemented in loco::PermutingDecoder< Domain::Matrix >.