ONE - On-device Neural Engine
|
#include <tflite_op_creator.h>
Public Member Functions | |
TFLiteOpCreator (mir::Graph *g) | |
std::vector< mir::Operation::Output * > | convertConv2D (const tflite::Conv2DOptionsT *opts, const std::vector< mir::Operation::Output * > &inputs) |
std::vector< mir::Operation::Output * > | convertDepthwiseConv2D (const tflite::DepthwiseConv2DOptionsT *opts, const std::vector< mir::Operation::Output * > &inputs) |
std::vector< mir::Operation::Output * > | convertConcatenation (const tflite::ConcatenationOptionsT *opts, const std::vector< mir::Operation::Output * > &inputs) |
std::vector< mir::Operation::Output * > | convertMaxPool2D (const tflite::Pool2DOptionsT *opts, const std::vector< mir::Operation::Output * > &inputs) |
std::vector< mir::Operation::Output * > | convertAveragePool2D (const tflite::Pool2DOptionsT *opts, const std::vector< mir::Operation::Output * > &inputs) |
std::vector< mir::Operation::Output * > | convertMean (const tflite::ReducerOptionsT *opts, const std::vector< mir::Operation::Output * > &inputs) |
std::vector< mir::Operation::Output * > | convertSoftmax (const tflite::SoftmaxOptionsT *opts, const std::vector< mir::Operation::Output * > &inputs) |
std::vector< mir::Operation::Output * > | convertSlice (const tflite::SliceOptionsT *opts, const std::vector< mir::Operation::Output * > &inputs) |
std::vector< mir::Operation::Output * > | convertReshape (const tflite::ReshapeOptionsT *opts, const std::vector< mir::Operation::Output * > &inputs) |
std::vector< mir::Operation::Output * > | convertFullyConnected (const tflite::FullyConnectedOptionsT *opts, const std::vector< mir::Operation::Output * > &inputs) |
std::vector< mir::Operation::Output * > | convertResizeNearestNeighbor (const tflite::ResizeNearestNeighborOptionsT *opts, const std::vector< mir::Operation::Output * > &inputs) |
std::vector< mir::Operation::Output * > | convertLogistic (const std::vector< mir::Operation::Output * > &inputs) |
std::vector< mir::Operation::Output * > | convertRsqrt (const std::vector< mir::Operation::Output * > &inputs) |
std::vector< mir::Operation::Output * > | convertSqrt (const std::vector< mir::Operation::Output * > &inputs) |
std::vector< mir::Operation::Output * > | convertSqueeze (const tflite::SqueezeOptionsT *opts, const std::vector< mir::Operation::Output * > &inputs) |
std::vector< mir::Operation::Output * > | convertAdd (const tflite::AddOptionsT *opts, const std::vector< mir::Operation::Output * > &inputs) |
std::vector< mir::Operation::Output * > | convertSub (const tflite::SubOptionsT *opts, const std::vector< mir::Operation::Output * > &inputs) |
std::vector< mir::Operation::Output * > | convertMul (const tflite::MulOptionsT *opts, const std::vector< mir::Operation::Output * > &inputs) |
std::vector< mir::Operation::Output * > | convertDiv (const tflite::DivOptionsT *opts, const std::vector< mir::Operation::Output * > &inputs) |
std::vector< mir::Operation::Output * > | convertMax (const std::vector< mir::Operation::Output * > &inputs) |
std::vector< mir::Operation::Output * > | convertSquaredDifference (const std::vector< mir::Operation::Output * > &inputs) |
std::vector< mir::Operation::Output * > | convertTanh (const std::vector< mir::Operation::Output * > &inputs) |
std::vector< mir::Operation::Output * > | convertReLU (const std::vector< mir::Operation::Output * > &inputs) |
std::vector< mir::Operation::Output * > | convertReLU6 (const std::vector< mir::Operation::Output * > &inputs) |
std::vector< mir::Operation::Output * > | convertTransposeConv (const tflite::TransposeConvOptionsT *opts, const std::vector< mir::Operation::Output * > &inputs) |
std::vector< mir::Operation::Output * > | convertPad (const tflite::PadOptionsT *opts, const std::vector< mir::Operation::Output * > &inputs) |
std::vector< mir::Operation::Output * > | convertTranspose (const tflite::TransposeOptionsT *opts, const std::vector< mir::Operation::Output * > &inputs) |
std::vector< mir::Operation::Output * > | convertStridedSlice (const tflite::StridedSliceOptionsT *opts, const std::vector< mir::Operation::Output * > &inputs) |
std::vector< mir::Operation::Output * > | convertLeakyReLU (const tflite::LeakyReluOptionsT *opts, const std::vector< mir::Operation::Output * > &inputs) |
std::vector< mir::Operation::Output * > | convertShape (const tflite::ShapeOptionsT *opts, const std::vector< mir::Operation::Output * > &inputs) |
std::vector< mir::Operation::Output * > | convertHardSwish (const tflite::HardSwishOptionsT *opts, const std::vector< mir::Operation::Output * > &inputs) |
Definition at line 30 of file tflite_op_creator.h.
|
inlineexplicit |
Definition at line 33 of file tflite_op_creator.h.
std::vector< mir::Operation::Output * > mir_tflite::TFLiteOpCreator::convertAdd | ( | const tflite::AddOptionsT * | opts, |
const std::vector< mir::Operation::Output * > & | inputs | ||
) |
Definition at line 340 of file tflite_op_creator.cpp.
std::vector< mir::Operation::Output * > mir_tflite::TFLiteOpCreator::convertAveragePool2D | ( | const tflite::Pool2DOptionsT * | opts, |
const std::vector< mir::Operation::Output * > & | inputs | ||
) |
Definition at line 233 of file tflite_op_creator.cpp.
References mir::AvgPool2DOpAttributes::include_pad, mir::AvgPool2DOpAttributes::padding_after, mir::AvgPool2DOpAttributes::padding_before, mir::AvgPool2DOpAttributes::strides, and mir::AvgPool2DOpAttributes::window.
std::vector< mir::Operation::Output * > mir_tflite::TFLiteOpCreator::convertConcatenation | ( | const tflite::ConcatenationOptionsT * | opts, |
const std::vector< mir::Operation::Output * > & | inputs | ||
) |
Definition at line 202 of file tflite_op_creator.cpp.
std::vector< mir::Operation::Output * > mir_tflite::TFLiteOpCreator::convertConv2D | ( | const tflite::Conv2DOptionsT * | opts, |
const std::vector< mir::Operation::Output * > & | inputs | ||
) |
Definition at line 132 of file tflite_op_creator.cpp.
References mir::Conv2DOpAttributes::padding_after, mir::Conv2DOpAttributes::padding_before, and mir::Conv2DOpAttributes::strides.
std::vector< mir::Operation::Output * > mir_tflite::TFLiteOpCreator::convertDepthwiseConv2D | ( | const tflite::DepthwiseConv2DOptionsT * | opts, |
const std::vector< mir::Operation::Output * > & | inputs | ||
) |
Definition at line 165 of file tflite_op_creator.cpp.
References mir::Conv2DOpAttributes::padding_after, mir::Conv2DOpAttributes::padding_before, and mir::Conv2DOpAttributes::strides.
std::vector< mir::Operation::Output * > mir_tflite::TFLiteOpCreator::convertDiv | ( | const tflite::DivOptionsT * | opts, |
const std::vector< mir::Operation::Output * > & | inputs | ||
) |
Definition at line 367 of file tflite_op_creator.cpp.
std::vector< mir::Operation::Output * > mir_tflite::TFLiteOpCreator::convertFullyConnected | ( | const tflite::FullyConnectedOptionsT * | opts, |
const std::vector< mir::Operation::Output * > & | inputs | ||
) |
Definition at line 405 of file tflite_op_creator.cpp.
References mir::Shape::dim(), and mir::Shape::numElements().
std::vector< mir::Operation::Output * > mir_tflite::TFLiteOpCreator::convertHardSwish | ( | const tflite::HardSwishOptionsT * | opts, |
const std::vector< mir::Operation::Output * > & | inputs | ||
) |
Definition at line 645 of file tflite_op_creator.cpp.
std::vector< mir::Operation::Output * > mir_tflite::TFLiteOpCreator::convertLeakyReLU | ( | const tflite::LeakyReluOptionsT * | opts, |
const std::vector< mir::Operation::Output * > & | inputs | ||
) |
std::vector< mir::Operation::Output * > mir_tflite::TFLiteOpCreator::convertLogistic | ( | const std::vector< mir::Operation::Output * > & | inputs | ) |
std::vector< mir::Operation::Output * > mir_tflite::TFLiteOpCreator::convertMax | ( | const std::vector< mir::Operation::Output * > & | inputs | ) |
Definition at line 376 of file tflite_op_creator.cpp.
std::vector< mir::Operation::Output * > mir_tflite::TFLiteOpCreator::convertMaxPool2D | ( | const tflite::Pool2DOptionsT * | opts, |
const std::vector< mir::Operation::Output * > & | inputs | ||
) |
Definition at line 210 of file tflite_op_creator.cpp.
References mir::MaxPool2DOpAttributes::padding_after, mir::MaxPool2DOpAttributes::padding_before, mir::MaxPool2DOpAttributes::strides, and mir::MaxPool2DOpAttributes::window.
std::vector< mir::Operation::Output * > mir_tflite::TFLiteOpCreator::convertMean | ( | const tflite::ReducerOptionsT * | opts, |
const std::vector< mir::Operation::Output * > & | inputs | ||
) |
Definition at line 393 of file tflite_op_creator.cpp.
std::vector< mir::Operation::Output * > mir_tflite::TFLiteOpCreator::convertMul | ( | const tflite::MulOptionsT * | opts, |
const std::vector< mir::Operation::Output * > & | inputs | ||
) |
Definition at line 358 of file tflite_op_creator.cpp.
std::vector< mir::Operation::Output * > mir_tflite::TFLiteOpCreator::convertPad | ( | const tflite::PadOptionsT * | opts, |
const std::vector< mir::Operation::Output * > & | inputs | ||
) |
Definition at line 467 of file tflite_op_creator.cpp.
References mir::Tensor< T >::at(), mir::PadOpAttributes::padding_after, mir::PadOpAttributes::padding_before, and mir::Shape::rank().
std::vector< mir::Operation::Output * > mir_tflite::TFLiteOpCreator::convertReLU | ( | const std::vector< mir::Operation::Output * > & | inputs | ) |
std::vector< mir::Operation::Output * > mir_tflite::TFLiteOpCreator::convertReLU6 | ( | const std::vector< mir::Operation::Output * > & | inputs | ) |
std::vector< mir::Operation::Output * > mir_tflite::TFLiteOpCreator::convertReshape | ( | const tflite::ReshapeOptionsT * | opts, |
const std::vector< mir::Operation::Output * > & | inputs | ||
) |
Definition at line 284 of file tflite_op_creator.cpp.
References mir::Shape::dim().
std::vector< mir::Operation::Output * > mir_tflite::TFLiteOpCreator::convertResizeNearestNeighbor | ( | const tflite::ResizeNearestNeighborOptionsT * | opts, |
const std::vector< mir::Operation::Output * > & | inputs | ||
) |
Definition at line 322 of file tflite_op_creator.cpp.
References mir::Tensor< T >::at(), and mir::Shape::dim().
std::vector< mir::Operation::Output * > mir_tflite::TFLiteOpCreator::convertRsqrt | ( | const std::vector< mir::Operation::Output * > & | inputs | ) |
Definition at line 515 of file tflite_op_creator.cpp.
std::vector< mir::Operation::Output * > mir_tflite::TFLiteOpCreator::convertShape | ( | const tflite::ShapeOptionsT * | opts, |
const std::vector< mir::Operation::Output * > & | inputs | ||
) |
Definition at line 624 of file tflite_op_creator.cpp.
References mir::Shape::dim(), and mir::Shape::rank().
std::vector< mir::Operation::Output * > mir_tflite::TFLiteOpCreator::convertSlice | ( | const tflite::SliceOptionsT * | opts, |
const std::vector< mir::Operation::Output * > & | inputs | ||
) |
Definition at line 270 of file tflite_op_creator.cpp.
std::vector< mir::Operation::Output * > mir_tflite::TFLiteOpCreator::convertSoftmax | ( | const tflite::SoftmaxOptionsT * | opts, |
const std::vector< mir::Operation::Output * > & | inputs | ||
) |
Definition at line 257 of file tflite_op_creator.cpp.
std::vector< mir::Operation::Output * > mir_tflite::TFLiteOpCreator::convertSqrt | ( | const std::vector< mir::Operation::Output * > & | inputs | ) |
std::vector< mir::Operation::Output * > mir_tflite::TFLiteOpCreator::convertSquaredDifference | ( | const std::vector< mir::Operation::Output * > & | inputs | ) |
std::vector< mir::Operation::Output * > mir_tflite::TFLiteOpCreator::convertSqueeze | ( | const tflite::SqueezeOptionsT * | opts, |
const std::vector< mir::Operation::Output * > & | inputs | ||
) |
std::vector< mir::Operation::Output * > mir_tflite::TFLiteOpCreator::convertStridedSlice | ( | const tflite::StridedSliceOptionsT * | opts, |
const std::vector< mir::Operation::Output * > & | inputs | ||
) |
Definition at line 558 of file tflite_op_creator.cpp.
References begin, mir::Shape::dim(), mir::Shape::rank(), and size.
std::vector< mir::Operation::Output * > mir_tflite::TFLiteOpCreator::convertSub | ( | const tflite::SubOptionsT * | opts, |
const std::vector< mir::Operation::Output * > & | inputs | ||
) |
Definition at line 349 of file tflite_op_creator.cpp.
std::vector< mir::Operation::Output * > mir_tflite::TFLiteOpCreator::convertTanh | ( | const std::vector< mir::Operation::Output * > & | inputs | ) |
std::vector< mir::Operation::Output * > mir_tflite::TFLiteOpCreator::convertTranspose | ( | const tflite::TransposeOptionsT * | opts, |
const std::vector< mir::Operation::Output * > & | inputs | ||
) |
Definition at line 546 of file tflite_op_creator.cpp.
std::vector< mir::Operation::Output * > mir_tflite::TFLiteOpCreator::convertTransposeConv | ( | const tflite::TransposeConvOptionsT * | opts, |
const std::vector< mir::Operation::Output * > & | inputs | ||
) |
Definition at line 301 of file tflite_op_creator.cpp.
References output_shape, mir::Deconv2DOpAttributes::padding_type, and mir::Deconv2DOpAttributes::strides.