ONE - On-device Neural Engine
|
Class to have information of the operand for feature. More...
#include <Object.h>
Public Types | |
using | Generator = std::function< T(const Shape &shape, const Index &index)> |
Public Member Functions | |
Object (const Shape &shape, const Generator &fn) | |
Construct Object object with Shape of feature and set value used by Generator. | |
const Shape & | shape (void) const |
Get Shape of feature as the reference. | |
T | at (uint32_t ch, uint32_t row, uint32_t col) const override |
Get the value used by three indexes. | |
Public Member Functions inherited from nnfw::misc::feature::Reader< T > | |
virtual | ~Reader ()=default |
Destruct Reader object using default destructor. | |
virtual T | at (uint32_t batch, uint32_t ch, uint32_t row, uint32_t col) const =0 |
Get the value used by four indexes. | |
Class to have information of the operand for feature.
using nnfw::misc::feature::Object< T >::Generator = std::function<T(const Shape &shape, const Index &index)> |
|
inline |
Construct Object object with Shape of feature and set value used by Generator.
[in] | shape | Reference of Shape for feature |
[in] | fn | A function to set values of operand tensor |
Definition at line 53 of file Object.h.
References nnfw::misc::feature::Shape::C, nnfw::misc::feature::Shape::H, and nnfw::misc::feature::Shape::W.
|
inlineoverridevirtual |
Get the value used by three indexes.
[in] | ch | The depth index |
[in] | row | The height index |
[in] | col | The width index |
Implements nnfw::misc::feature::Reader< T >.
Definition at line 84 of file Object.h.
|
inline |
Get Shape of feature as the reference.
Definition at line 74 of file Object.h.
Referenced by RandomDataGenerator.RandomDataGenerator::_gen_float32(), RandomDataGenerator.RandomDataGenerator::_gen_int16(), and RandomDataGenerator.RandomDataGenerator::_gen_uint8().