ONE - On-device Neural Engine
|
Data Structures | |
class | GeneratedModel |
class | Logger |
Logger Implementation. More... | |
class | LoggerConfig |
Logger Configuration. More... | |
struct | LoggingContext |
Global logging context. More... | |
struct | RecipeChefContext |
class | TFliteImport |
Loads TF lite file and provides helpers to access attributes. More... | |
class | TFliteOpAbs |
tflchef operator builder for abs More... | |
class | TFliteOpAdd |
tflchef operator builder for add More... | |
class | TFliteOpAddN |
tflchef operator builder for AddN More... | |
class | TFliteOpArgMax |
tflchef operator builder for ArgMax More... | |
class | TFliteOpArgMin |
tflchef operator builder for ArgMin More... | |
class | TFliteOpAveragePool2D |
tflchef operator builder for AveragePool2D More... | |
class | TFliteOpBatchMatMul |
tflchef operator builder for BATCH_MATMUL More... | |
class | TFliteOpBatchToSpaceND |
tflchef operator builder for BatchToSpaceND More... | |
class | TFliteOpBidirectionalSequenceLSTM |
tflchef operator builder for BidirectionalSequenceLSTM More... | |
class | TFliteOpBroadcastTo |
tflchef operator builder for BroadcastTo More... | |
class | TFliteOpCast |
tflchef operator builder for CAST More... | |
class | TFliteOpCeil |
tflchef operator builder for CEIL More... | |
class | TFliteOpChef |
Interface for each operators to build tflchef. More... | |
class | TFliteOpConcatenation |
tflchef operator builder for Concatenation More... | |
class | TFliteOpConv2D |
tflchef operator builder for Conv2D More... | |
class | TFliteOpCos |
tflchef operator builder for Cos More... | |
class | TFliteOpCumsum |
tflchef operator builder for CumSum More... | |
class | TFliteOpDepthToSpace |
tflchef operator builder for DepthToSpace More... | |
class | TFliteOpDepthwiseConv2D |
tflchef operator builder for DepthwiseConv2D More... | |
class | TFliteOpDequantize |
tflchef operator builder for Dequantize More... | |
class | TFliteOpDiv |
tflchef operator builder for division More... | |
class | TFliteOpELU |
tflchef operator builder for ELU More... | |
class | TFliteOpEqual |
tflchef operator builder for Equal More... | |
class | TFliteOpExp |
tflchef operator builder for Exp More... | |
class | TFliteOpExpandDims |
tflchef operator builder for ExpandDims More... | |
class | TFliteOpFakeQuant |
tflchef operator builder for FakeQuant More... | |
class | TFliteOpFill |
tflchef operator builder for Fill More... | |
class | TFliteOpFloor |
tflchef operator builder for FLOOR More... | |
class | TFliteOpFloorDiv |
tflchef operator builder for floor division More... | |
class | TFliteOpFloorMod |
tflchef operator builder for FLOOR_MOD More... | |
class | TFliteOpFullyConnected |
tflchef operator builder for FullyConnected More... | |
class | TFliteOpGather |
tflchef operator builder for Gather More... | |
class | TFliteOpGatherNd |
tflchef operator builder for GatherNd More... | |
class | TFliteOpGelu |
tflchef operator builder for Gelu More... | |
class | TFliteOpGreater |
tflchef operator builder for Greater More... | |
class | TFliteOpGreaterEqual |
tflchef operator builder for Greater Equal More... | |
class | TFliteOpHardSwish |
tflchef operator builder for Hard Swish More... | |
class | TFliteOpL2Normalize |
tflchef operator builder for L2Normalize More... | |
class | TFliteOpL2Pool2D |
tflchef operator builder for L2_POOL_2D More... | |
class | TFliteOpLeakyRelu |
tflchef operator builder for LeakyReLU More... | |
class | TFliteOpLess |
tflchef operator builder for Less More... | |
class | TFliteOpLessEqual |
tflchef operator builder for LessEqual More... | |
class | TFliteOpLocalResponseNormalization |
tflchef operator builder for LocalResponseNormalization More... | |
class | TFliteOpLog |
tflchef operator builder for Log More... | |
class | TFliteOpLogicalAnd |
tflchef operator builder for LogicalAnd More... | |
class | TFliteOpLogicalNot |
tflchef operator builder for LogicalNot More... | |
class | TFliteOpLogicalOr |
tflchef operator builder for LogicalOr More... | |
class | TFliteOpLogistic |
tflchef operator builder for LOGISTIC More... | |
class | TFliteOpLogSoftmax |
tflchef operator builder for LogSoftmax More... | |
class | TFliteOpMatrixDiag |
tflchef operator builder for MatrixDiag More... | |
class | TFliteOpMatrixSetDiag |
tflchef operator builder for MatrixSetDiag More... | |
class | TFliteOpMaximum |
tflchef operator builder for maximum More... | |
class | TFliteOpMaxPool2D |
tflchef operator builder for MaxPool2D More... | |
class | TFliteOpMean |
tflchef operator builder for mean More... | |
class | TFliteOpMinimum |
tflchef operator builder for minimum More... | |
class | TFliteOpMirrorPad |
tflchef operator builder for MIRROR_PAD More... | |
class | TFliteOpMul |
tflchef operator builder for MUL More... | |
class | TFliteOpNeg |
tflchef operator builder for abs More... | |
class | TFliteOpNonMaxSuppressionV4 |
tflchef operator builder for NON_MAX_SUPPRESSION_V4 More... | |
class | TFliteOpNonMaxSuppressionV5 |
tflchef operator builder for NON_MAX_SUPPRESSION_V5 More... | |
class | TFliteOpNotEqual |
tflchef operator builder for Not Equal More... | |
class | TFliteOpOneHot |
tflchef operator builder for OneHot More... | |
class | TFliteOpPack |
tflchef operator builder for pack More... | |
class | TFliteOpPad |
tflchef operator builder for PAD More... | |
class | TFliteOpPadV2 |
tflchef operator builder for PADV2 More... | |
class | TFliteOpPow |
tflchef operator builder for Pow More... | |
class | TFliteOpPRelu |
tflchef operator builder for PRelu More... | |
class | TFliteOpQuantize |
tflchef operator builder for Quantize More... | |
class | TFliteOpRange |
tflchef operator builder for abs More... | |
class | TFliteOpRank |
tflchef operator builder for rank More... | |
class | TFliteOpReduceAny |
tflchef operator builder for REDUCE_ANY More... | |
class | TFliteOpReduceMax |
tflchef operator builder for Reduce Max More... | |
class | TFliteOpReduceMin |
tflchef operator builder for Reduce Min More... | |
class | TFliteOpReduceProd |
tflchef operator builder for REDUCE_PROD More... | |
class | TFliteOpRegistry |
tflchef operator registry More... | |
class | TFliteOpReLU |
tflchef operator builder for ReLU More... | |
class | TFliteOpReLU0To1 |
tflchef operator builder for RELU_0_TO_1 More... | |
class | TFliteOpReLU6 |
tflchef operator builder for ReLU6 More... | |
class | TFliteOpReLUN1To1 |
tflchef operator builder for RELU_N1_TO_1 More... | |
class | TFliteOpReshape |
tflchef operator builder for Reshape More... | |
class | TFliteOpResizeBilinear |
tflchef operator builder for ResizeBilinear More... | |
class | TFliteOpResizeNearestNeighbor |
tflchef operator builder for ResizeNearestNeighbor More... | |
class | TFliteOpReverseSequence |
tflchef operator builder for ReverseSequence More... | |
class | TFliteOpReverseV2 |
tflchef operator builder for ReverseV2 More... | |
class | TFliteOpRound |
tflchef operator builder for Round More... | |
class | TFliteOpRsqrt |
tflchef operator builder for Rsqrt More... | |
class | TFliteOpScatterNd |
tflchef operator builder for ScatterNd More... | |
class | TFliteOpSegmentSum |
tflchef operator builder for SEGMENT_SUM More... | |
class | TFliteOpSelect |
tflchef operator builder for SELECT More... | |
class | TFliteOpSelectV2 |
tflchef operator builder for SELECT More... | |
class | TFliteOpShape |
tflchef operator builder for SHAPE More... | |
class | TFliteOpSin |
tflchef operator builder for Sin More... | |
class | TFliteOpSlice |
tflchef operator builder for SLICE More... | |
class | TFliteOpSoftmax |
tflchef operator builder for Softmax More... | |
class | TFliteOpSpaceToBatchND |
tflchef operator builder for SpaceToBatchND More... | |
class | TFliteOpSpaceToDepth |
tflchef operator builder for SpaceToDepth More... | |
class | TFliteOpSparseToDense |
tflchef operator builder for SparseToDense More... | |
class | TFliteOpSplit |
tflchef operator builder for SPLIT More... | |
class | TFliteOpSplitV |
tflchef operator builder for SPLIT_V More... | |
class | TFliteOpSqrt |
tflchef operator builder for Sqrt More... | |
class | TFliteOpSquare |
tflchef operator builder for Square More... | |
class | TFliteOpSquaredDifference |
tflchef operator builder for SquaredDifference More... | |
class | TFliteOpSqueeze |
tflchef operator builder for Squeeze More... | |
class | TFliteOpStridedSlice |
tflchef operator builder for StridedSlice More... | |
class | TFliteOpSub |
tflchef operator builder for Sub More... | |
class | TFliteOpSum |
tflchef operator builder for sum More... | |
class | TFliteOpSVDF |
tflchef operator builder for SVDF More... | |
class | TFliteOpTanh |
tflchef operator builder for Tanh More... | |
class | TFliteOpTile |
tflchef operator builder for Tile More... | |
class | TFliteOpTopKV2 |
tflchef operator builder for TOPK_V2 More... | |
class | TFliteOpTranspose |
tflchef operator builder for Transpose More... | |
class | TFliteOpTransposeConv |
tflchef operator builder for TransposeConv More... | |
class | TFliteOpUnidirectionalSequenceLSTM |
tflchef operator builder for UnidirectionalSequenceLSTM More... | |
class | TFliteOpUnique |
tflchef operator builder for Unique More... | |
class | TFliteOpUnpack |
tflchef operator builder for Unpack More... | |
class | TFliteOpWhere |
tflchef operator builder for Where More... | |
class | TFliteOpWhile |
tflchef operator builder for While More... | |
class | TFliteOpZerosLike |
tflchef operator builder for ZerosLike More... | |
Typedefs | |
using | TFliteSubGraphs_t = flatbuffers::Vector< flatbuffers::Offset< tflite::SubGraph > > |
using | TFliteTensors_t = flatbuffers::Vector< flatbuffers::Offset< tflite::Tensor > > |
using | TFliteBuffers_t = flatbuffers::Vector< flatbuffers::Offset< tflite::Buffer > > |
using | TFliteOperators_t = flatbuffers::Vector< flatbuffers::Offset< tflite::Operator > > |
Functions | |
GeneratedModel | cook (const ModelRecipe &model_recipe) |
std::unique_ptr< ModelRecipe > | generate_recipe (const tflite::Model *model) |
Create ModelRecipe from tflite::Model. | |
bool | write_recipe (const std::string &filename, std::unique_ptr< ModelRecipe > &recipe) |
Write ModelRecipe to file with given name. | |
tflchef::TensorType | as_tflchef_type (const tflite::TensorType type) |
tflchef::Activation | as_tflchef_activation (const tflite::ActivationFunctionType type) |
tflchef::Padding | as_tflchef_padding (const tflite::Padding padding) |
tflchef::MirrorPadMode | as_tflchef_mirrorpadmode (const tflite::MirrorPadMode mode) |
tflchef::DimensionType | as_tflchef_sparse_dim_type (const tflite::DimensionType type) |
tflchef::SparseIndexVecType | as_tflchef_sparse_idx_vec_type (const tflite::SparseIndexVector type) |
template<typename DT > | |
std::vector< DT > | extract_buffer (const tflite::Buffer *buffer) |
extract buffer data to std::vector<DT> | |
template<typename T > | |
std::vector< T > | as_index_vector (const flatbuffers::Vector< T > *flat_array) |
void | fill_tensor_to_import (int32_t idx, TFliteImport *import) |
void | fill_two_inputs (const tflite::Operator *op, TFliteImport *import) |
void | set_inputs (TFliteImport *import, tflchef::Operation *operation, const tflite::Operator *op) |
void | set_outputs (TFliteImport *import, tflchef::Operation *operation, const tflite::Operator *op) |
using tflchef::TFliteBuffers_t = typedef flatbuffers::Vector<flatbuffers::Offset<tflite::Buffer> > |
Definition at line 34 of file TFliteImport.h.
using tflchef::TFliteOperators_t = typedef flatbuffers::Vector<flatbuffers::Offset<tflite::Operator> > |
Definition at line 35 of file TFliteImport.h.
using tflchef::TFliteSubGraphs_t = typedef flatbuffers::Vector<flatbuffers::Offset<tflite::SubGraph> > |
Definition at line 32 of file TFliteImport.h.
using tflchef::TFliteTensors_t = typedef flatbuffers::Vector<flatbuffers::Offset<tflite::Tensor> > |
Definition at line 33 of file TFliteImport.h.
std::vector< T > tflchef::as_index_vector | ( | const flatbuffers::Vector< T > * | flat_array | ) |
Definition at line 47 of file Convert.h.
References flatbuffers::Vector< T >::Get(), and flatbuffers::Vector< T >::size().
Referenced by tflchef::TFliteOpReshape::build(), tflchef::TFliteOpSqueeze::build(), fill_two_inputs(), tflchef::TFliteOpBroadcastTo::filler(), tflchef::TFliteOpAddN::filler(), tflchef::TFliteOpBidirectionalSequenceLSTM::filler(), tflchef::TFliteOpConv2D::filler(), tflchef::TFliteOpDepthwiseConv2D::filler(), tflchef::TFliteOpPadV2::filler(), tflchef::TFliteOpPRelu::filler(), tflchef::TFliteOpReshape::filler(), tflchef::TFliteOpReverseSequence::filler(), tflchef::TFliteOpReverseV2::filler(), tflchef::TFliteOpScatterNd::filler(), tflchef::TFliteOpSegmentSum::filler(), tflchef::TFliteOpSlice::filler(), tflchef::TFliteOpStridedSlice::filler(), tflchef::TFliteOpSVDF::filler(), tflchef::TFliteOpUnidirectionalSequenceLSTM::filler(), generate_recipe(), tflchef::TFliteImport::select_sub_graph(), set_inputs(), and set_outputs().
tflchef::Activation tflchef::as_tflchef_activation | ( | const tflite::ActivationFunctionType | type | ) |
Definition at line 50 of file Convert.cpp.
Referenced by tflchef::TFliteOpAdd::build(), tflchef::TFliteOpAveragePool2D::build(), tflchef::TFliteOpBidirectionalSequenceLSTM::build(), tflchef::TFliteOpConcatenation::build(), tflchef::TFliteOpConv2D::build(), tflchef::TFliteOpDepthwiseConv2D::build(), tflchef::TFliteOpDiv::build(), tflchef::TFliteOpFullyConnected::build(), tflchef::TFliteOpL2Normalize::build(), tflchef::TFliteOpL2Pool2D::build(), tflchef::TFliteOpMaxPool2D::build(), tflchef::TFliteOpMul::build(), tflchef::TFliteOpSub::build(), tflchef::TFliteOpSVDF::build(), tflchef::TFliteOpTransposeConv::build(), and tflchef::TFliteOpUnidirectionalSequenceLSTM::build().
tflchef::MirrorPadMode tflchef::as_tflchef_mirrorpadmode | ( | const tflite::MirrorPadMode | mode | ) |
Definition at line 84 of file Convert.cpp.
Referenced by tflchef::TFliteOpMirrorPad::build().
tflchef::Padding tflchef::as_tflchef_padding | ( | const tflite::Padding | padding | ) |
Definition at line 71 of file Convert.cpp.
Referenced by tflchef::TFliteOpAveragePool2D::build(), tflchef::TFliteOpConv2D::build(), tflchef::TFliteOpDepthwiseConv2D::build(), tflchef::TFliteOpL2Pool2D::build(), tflchef::TFliteOpMaxPool2D::build(), and tflchef::TFliteOpTransposeConv::build().
tflchef::DimensionType tflchef::as_tflchef_sparse_dim_type | ( | const tflite::DimensionType | type | ) |
Definition at line 97 of file Convert.cpp.
Referenced by generate_recipe().
tflchef::SparseIndexVecType tflchef::as_tflchef_sparse_idx_vec_type | ( | const tflite::SparseIndexVector | type | ) |
Definition at line 110 of file Convert.cpp.
tflchef::TensorType tflchef::as_tflchef_type | ( | const tflite::TensorType | type | ) |
Definition at line 22 of file Convert.cpp.
Referenced by tflchef::TFliteOpArgMax::build(), tflchef::TFliteOpArgMin::build(), tflchef::TFliteOpCast::build(), tflchef::TFliteOpShape::build(), tflchef::TFliteOpUnique::build(), and generate_recipe().
GeneratedModel tflchef::cook | ( | const ModelRecipe & | model_recipe | ) |
Referenced by entry(), and entry_stream().
std::vector< DT > tflchef::extract_buffer | ( | const tflite::Buffer * | buffer | ) |
extract buffer data to std::vector<DT>
Definition at line 37 of file Convert.h.
void tflchef::fill_tensor_to_import | ( | int32_t | idx, |
TFliteImport * | import | ||
) |
Definition at line 24 of file FillerHelper.cpp.
Referenced by fill_two_inputs(), tflchef::TFliteOpBroadcastTo::filler(), tflchef::TFliteOpAddN::filler(), tflchef::TFliteOpBidirectionalSequenceLSTM::filler(), tflchef::TFliteOpFullyConnected::filler(), tflchef::TFliteOpLess::filler(), tflchef::TFliteOpNonMaxSuppressionV4::filler(), tflchef::TFliteOpNonMaxSuppressionV5::filler(), tflchef::TFliteOpPadV2::filler(), tflchef::TFliteOpReshape::filler(), tflchef::TFliteOpReverseSequence::filler(), tflchef::TFliteOpReverseV2::filler(), tflchef::TFliteOpScatterNd::filler(), tflchef::TFliteOpSegmentSum::filler(), tflchef::TFliteOpUnidirectionalSequenceLSTM::filler(), and tflchef::TFliteOpWhile::filler().
void tflchef::fill_two_inputs | ( | const tflite::Operator * | op, |
TFliteImport * | import | ||
) |
Definition at line 56 of file FillerHelper.cpp.
References as_index_vector(), and fill_tensor_to_import().
Referenced by tflchef::TFliteOpAdd::filler(), tflchef::TFliteOpMaximum::filler(), tflchef::TFliteOpMinimum::filler(), tflchef::TFliteOpMul::filler(), and tflchef::TFliteOpSub::filler().
std::unique_ptr< ModelRecipe > tflchef::generate_recipe | ( | const tflite::Model * | model | ) |
Create ModelRecipe from tflite::Model.
This will build ModelRecipe from tflite::Model First to check operand filler options by scanning all operators, then translate all operands and operators. Last will set network inputs and outputs.
Definition at line 71 of file RecipeChef.cpp.
References as_index_vector(), as_tflchef_sparse_dim_type(), as_tflchef_type(), tflchef::TFliteImport::buffers(), tflchef::TFliteImport::builtin_code(), tflchef::RecipeChefContext::chefop, tflchef::TFliteOpRegistry::get(), souschef::TensorFiller::get_tensor_filler(), tflchef::TFliteImport::inputs(), tflchef::TFliteImport::num_subgraph(), tflchef::TFliteImport::opcode_name(), tflchef::TFliteImport::operators(), tflchef::TFliteImport::outputs(), tflchef::TFliteImport::select_sub_graph(), set_inputs(), set_outputs(), mio::tflite::tensor_name(), tflchef::TFliteImport::tensors(), and tflchef::RecipeChefContext::tflop.
Referenced by entry().
void tflchef::set_inputs | ( | TFliteImport * | import, |
tflchef::Operation * | operation, | ||
const tflite::Operator * | op | ||
) |
Definition at line 32 of file RecipeChef.cpp.
References as_index_vector(), and mio::tflite::tensor_name().
Referenced by generate_recipe().
void tflchef::set_outputs | ( | TFliteImport * | import, |
tflchef::Operation * | operation, | ||
const tflite::Operator * | op | ||
) |
Definition at line 52 of file RecipeChef.cpp.
References as_index_vector(), and mio::tflite::tensor_name().
Referenced by generate_recipe().
bool tflchef::write_recipe | ( | const std::string & | filename, |
std::unique_ptr< ModelRecipe > & | recipe | ||
) |
Write ModelRecipe to file with given name.
Definition at line 352 of file RecipeChef.cpp.
Referenced by entry().