ONE - On-device Neural Engine
Loading...
Searching...
No Matches
tfldump::OpPrinterRegistry Class Reference

#include <OpPrinter.h>

Public Member Functions

 OpPrinterRegistry ()
 
const OpPrinterlookup (tflite::BuiltinOperator op) const
 

Static Public Member Functions

static OpPrinterRegistryget ()
 

Detailed Description

Definition at line 34 of file OpPrinter.h.

Constructor & Destructor Documentation

◆ OpPrinterRegistry()

tfldump::OpPrinterRegistry::OpPrinterRegistry ( )

Definition at line 741 of file OpPrinter.cpp.

742{
743 _op_map[tflite::BuiltinOperator_ADD] = make_unique<AddPrinter>();
744 // There is no Option for ADD_N
745 _op_map[tflite::BuiltinOperator_ARG_MAX] = make_unique<ArgMaxPrinter>();
746 _op_map[tflite::BuiltinOperator_ARG_MIN] = make_unique<ArgMinPrinter>();
747 _op_map[tflite::BuiltinOperator_AVERAGE_POOL_2D] = make_unique<Pool2DPrinter>();
748 _op_map[tflite::BuiltinOperator_BIDIRECTIONAL_SEQUENCE_LSTM] =
749 make_unique<BidirectionalSequenceLSTMPrinter>();
750 _op_map[tflite::BuiltinOperator_CAST] = make_unique<CastPrinter>();
751 // There is no Option for CEIL
752 _op_map[tflite::BuiltinOperator_CONCATENATION] = make_unique<ConcatenationPrinter>();
753 _op_map[tflite::BuiltinOperator_CONV_2D] = make_unique<Conv2DPrinter>();
754 // There is no Option for DENSIFY
755 _op_map[tflite::BuiltinOperator_DEPTH_TO_SPACE] = make_unique<DepthToSpacePrinter>();
756 _op_map[tflite::BuiltinOperator_DEPTHWISE_CONV_2D] = make_unique<DepthwiseConv2DPrinter>();
757 // There is no Option for DEQUANTIZE
758 _op_map[tflite::BuiltinOperator_DIV] = make_unique<DivPrinter>();
759 _op_map[tflite::BuiltinOperator_FAKE_QUANT] = make_unique<FakeQuantPrinter>();
760 // There is no Option for FLOOR
761 // There is no Option for FLOOR_MOD
762 _op_map[tflite::BuiltinOperator_FULLY_CONNECTED] = make_unique<FullyConnectedPrinter>();
763 _op_map[tflite::BuiltinOperator_GATHER] = make_unique<GatherPrinter>();
764 _op_map[tflite::BuiltinOperator_GELU] = make_unique<GeluPrinter>();
765 _op_map[tflite::BuiltinOperator_IF] = make_unique<IfPrinter>();
766 _op_map[tflite::BuiltinOperator_L2_POOL_2D] = make_unique<Pool2DPrinter>();
767 _op_map[tflite::BuiltinOperator_L2_NORMALIZATION] = make_unique<L2NormPrinter>();
768 _op_map[tflite::BuiltinOperator_LEAKY_RELU] = make_unique<LeakyReluPrinter>();
769 _op_map[tflite::BuiltinOperator_LOCAL_RESPONSE_NORMALIZATION] =
770 make_unique<LocalResponseNormalizationPrinter>();
771 // There is no Option for LOG
772 // There is no Option for LOGISTIC
773 // There is no Option for LOG_SOFTMAX
774 _op_map[tflite::BuiltinOperator_MAX_POOL_2D] = make_unique<Pool2DPrinter>();
775 _op_map[tflite::BuiltinOperator_MEAN] = make_unique<ReducerPrinter>();
776 _op_map[tflite::BuiltinOperator_MIRROR_PAD] = make_unique<MirrorPadPrinter>();
777 _op_map[tflite::BuiltinOperator_MUL] = make_unique<MulPrinter>();
778 // There is no Option for NON_MAX_SUPPRESSION_V4
779 // There is no Option for NON_MAX_SUPPRESSION_V5
780 _op_map[tflite::BuiltinOperator_ONE_HOT] = make_unique<OneHotPrinter>();
781 _op_map[tflite::BuiltinOperator_PACK] = make_unique<PackPrinter>();
782 // There is no Option for PAD
783 // There is no Option for PADV2
784 // There is no Option for PRELU
785 // There is no Option for RELU
786 // There is no Option for RELU6
787 // There is no Option for RELU_0_TO_1
788 // There is no Option for RELU_N1_TO_1
789 _op_map[tflite::BuiltinOperator_REDUCE_ANY] = make_unique<ReducerPrinter>();
790 _op_map[tflite::BuiltinOperator_REDUCE_MAX] = make_unique<ReducerPrinter>();
791 _op_map[tflite::BuiltinOperator_REDUCE_MIN] = make_unique<ReducerPrinter>();
792 _op_map[tflite::BuiltinOperator_REDUCE_PROD] = make_unique<ReducerPrinter>();
793 _op_map[tflite::BuiltinOperator_RESHAPE] = make_unique<ReshapePrinter>();
794 _op_map[tflite::BuiltinOperator_RESIZE_BILINEAR] = make_unique<ResizeBilinearPrinter>();
795 _op_map[tflite::BuiltinOperator_RESIZE_NEAREST_NEIGHBOR] =
796 make_unique<ResizeNearestNeighborPrinter>();
797 _op_map[tflite::BuiltinOperator_REVERSE_SEQUENCE] = make_unique<ReverseSequencePrinter>();
798 // There is no Option for ROUND
799 // There is no Option for SELECT
800 // There is no Option for SELECT_V2
801 _op_map[tflite::BuiltinOperator_SHAPE] = make_unique<ShapePrinter>();
802 // There is no Option for SIN
803 // There is no Option for SLICE
804 _op_map[tflite::BuiltinOperator_SOFTMAX] = make_unique<SoftmaxPrinter>();
805 _op_map[tflite::BuiltinOperator_SPACE_TO_DEPTH] = make_unique<SpaceToDepthPrinter>();
806 // There is no Option for SPACE_TO_BATCH_ND
807 _op_map[tflite::BuiltinOperator_SPARSE_TO_DENSE] = make_unique<SparseToDensePrinter>();
808 _op_map[tflite::BuiltinOperator_SPLIT] = make_unique<SplitPrinter>();
809 _op_map[tflite::BuiltinOperator_SPLIT_V] = make_unique<SplitVPrinter>();
810 _op_map[tflite::BuiltinOperator_SQUEEZE] = make_unique<SqueezePrinter>();
811 _op_map[tflite::BuiltinOperator_STRIDED_SLICE] = make_unique<StridedSlicePrinter>();
812 _op_map[tflite::BuiltinOperator_SUB] = make_unique<SubPrinter>();
813 _op_map[tflite::BuiltinOperator_SUM] = make_unique<ReducerPrinter>();
814 _op_map[tflite::BuiltinOperator_SVDF] = make_unique<SVDFPrinter>();
815 _op_map[tflite::BuiltinOperator_TRANSPOSE_CONV] = make_unique<TransposeConvPrinter>();
816 // There is no Option for TOPK_V2
817 _op_map[tflite::BuiltinOperator_UNIDIRECTIONAL_SEQUENCE_LSTM] =
818 make_unique<UnidirectionalSequenceLSTMPrinter>();
819 _op_map[tflite::BuiltinOperator_UNIQUE] = make_unique<UniquePrinter>();
820 _op_map[tflite::BuiltinOperator_WHILE] = make_unique<WhilePrinter>();
821 _op_map[tflite::BuiltinOperator_CUSTOM] = make_unique<CustomOpPrinter>();
822}

Member Function Documentation

◆ get()

static OpPrinterRegistry & tfldump::OpPrinterRegistry::get ( )
inlinestatic

Definition at line 49 of file OpPrinter.h.

50 {
51 static OpPrinterRegistry me;
52 return me;
53 }

Referenced by tfldump::dump_sub_graph().

◆ lookup()

const OpPrinter * tfldump::OpPrinterRegistry::lookup ( tflite::BuiltinOperator  op) const
inline

Definition at line 40 of file OpPrinter.h.

41 {
42 if (_op_map.find(op) == _op_map.end())
43 return nullptr;
44
45 return _op_map.at(op).get();
46 }

The documentation for this class was generated from the following files: