ONE - On-device Neural Engine
|
Mapping between Matrix/Tensor Axis. More...
#include <PermutingCodec.h>
Public Member Functions | |
Permutation ()=default | |
bool | mapped (const MatrixAxis &axis_f) const |
Return whether a given matrix axis has a corresponding tensor axis. | |
TensorAxis | axis (const MatrixAxis &axis_f) const |
Get the tensor axis corresponding to a given matrix axis. | |
TensorAxis & | axis (const MatrixAxis &axis_f) |
Set the tensor axis corresponding to a given matrix axis. | |
TensorAxis | operator[] (const MatrixAxis &axis_f) const |
TensorAxis & | operator[] (const MatrixAxis &axis_f) |
Mapping between Matrix/Tensor Axis.
Definition at line 327 of file PermutingCodec.h.
|
default |
uint32_t & loco::Permutation< Domain::Matrix >::axis | ( | const MatrixAxis & | axis_f | ) |
Set the tensor axis corresponding to a given matrix axis.
Definition at line 561 of file PermutingCodec.cpp.
References loco::valid().
Referenced by metrics.categorical_accuracy.CategoricalAccuracy::update_state().
uint32_t loco::Permutation< Domain::Matrix >::axis | ( | const MatrixAxis & | axis_f | ) | const |
Get the tensor axis corresponding to a given matrix axis.
This method works correctly only for mapped matrix axes.
Definition at line 554 of file PermutingCodec.cpp.
References loco::valid().
Referenced by metrics.categorical_accuracy.CategoricalAccuracy::update_state().
bool loco::Permutation< Domain::Matrix >::mapped | ( | const MatrixAxis & | axis_f | ) | const |
Return whether a given matrix axis has a corresponding tensor axis.
This method does not validate the corresponding value.
Definition at line 548 of file PermutingCodec.cpp.
References loco::valid().
|
inline |
Definition at line 353 of file PermutingCodec.h.
|
inline |
Definition at line 352 of file PermutingCodec.h.