ONE - On-device Neural Engine
|
#include <TensorContext.h>
Public Types | |
template<typename T > | |
using | TypedReader = std::function< void(const TensorContext &, uint32_t n, const nncc::core::ADT::tensor::Reader< T > &)> |
template<typename T > | |
using | TypedAccessor = std::function< void(const TensorContext &, uint32_t n, nncc::core::ADT::tensor::Accessor< T > &)> |
Public Member Functions | |
virtual | ~TensorContext ()=default |
virtual uint32_t | size (void) const =0 |
virtual std::string | name (uint32_t n) const =0 |
virtual nncc::core::ADT::tensor::Shape | shape (uint32_t n) const =0 |
virtual bool | isFloatTensor (uint32_t n) const |
virtual void | getMutableFloatTensor (uint32_t n, const TypedAccessor< float > &cb) |
virtual void | getConstFloatTensor (uint32_t n, const TypedReader< float > &cb) const |
virtual bool | isS32Tensor (uint32_t n) const |
virtual void | getMutableS32Tensor (uint32_t n, const TypedAccessor< int32_t > &cb) |
virtual void | getConstS32Tensor (uint32_t n, const TypedReader< int32_t > &cb) const |
Definition at line 33 of file TensorContext.h.
using nnkit::TensorContext::TypedAccessor = std::function<void(const TensorContext &, uint32_t n, nncc::core::ADT::tensor::Accessor<T> &)> |
Definition at line 40 of file TensorContext.h.
using nnkit::TensorContext::TypedReader = std::function<void(const TensorContext &, uint32_t n, const nncc::core::ADT::tensor::Reader<T> &)> |
Definition at line 36 of file TensorContext.h.
|
virtualdefault |
|
inlinevirtual |
Reimplemented in nnkit::support::moco::tf::TensorContext, nnkit::support::moco::tf::InputTensorContext, nnkit::support::moco::tf::OutputTensorContext, nnkit::support::tf::TensorContext, nnkit::support::caffe::TensorContext< DType >, nnkit::support::onnx::TensorContext, and nnkit::support::tflite::TensorContext.
Definition at line 67 of file TensorContext.h.
Referenced by ShowAction::run(), and HD5ExportAction::run().
|
inlinevirtual |
Definition at line 83 of file TensorContext.h.
|
inlinevirtual |
Reimplemented in nnkit::support::moco::tf::InputTensorContext, nnkit::support::moco::tf::OutputTensorContext, nnkit::support::tf::TensorContext, nnkit::support::moco::tf::TensorContext, nnkit::support::caffe::TensorContext< DType >, nnkit::support::onnx::TensorContext, and nnkit::support::tflite::TensorContext.
Definition at line 62 of file TensorContext.h.
Referenced by HD5ImportAction::run().
|
inlinevirtual |
Definition at line 78 of file TensorContext.h.
|
inlinevirtual |
Reimplemented in nnkit::support::caffe::TensorContext< DType >, nnkit::support::moco::tf::TensorContext, nnkit::support::onnx::TensorContext, nnkit::support::tf::TensorContext, and nnkit::support::tflite::TensorContext.
Definition at line 57 of file TensorContext.h.
|
inlinevirtual |
Definition at line 73 of file TensorContext.h.
|
pure virtual |
Implemented in nnkit::support::caffe::TensorContext< DType >, nnkit::support::moco::tf::TensorContext, nnkit::support::onnx::TensorContext, nnkit::support::tf::TensorContext, and nnkit::support::tflite::TensorContext.
Referenced by ShowAction::run(), HD5ExportAction::run(), and HD5ImportAction::run().
|
pure virtual |
Implemented in nnkit::support::caffe::TensorContext< DType >, nnkit::support::moco::tf::TensorContext, nnkit::support::onnx::TensorContext, nnkit::support::tf::TensorContext, and nnkit::support::tflite::TensorContext.
Referenced by RandomDataGenerator.RandomDataGenerator::_gen_float32(), RandomDataGenerator.RandomDataGenerator::_gen_int16(), RandomDataGenerator.RandomDataGenerator::_gen_uint8(), HD5ExportAction::run(), and HD5ImportAction::run().
|
pure virtual |
Implemented in nnkit::support::caffe::TensorContext< DType >, nnkit::support::moco::tf::TensorContext, nnkit::support::onnx::TensorContext, nnkit::support::tf::TensorContext, and nnkit::support::tflite::TensorContext.
Referenced by ShowAction::run(), RandomizeAction::run(), HD5ExportAction::run(), and HD5ImportAction::run().