mindspore_lite.FmkType

View Source On Gitee
class mindspore_lite.FmkType[source]

When Converter, the FmkType is used to define Input model framework type.

Currently, the following model framework types are supported:

Definition

Description

FmkType.TF

TensorFlow model’s framework type, and the model uses .pb as suffix.

FmkType.CAFFE

Caffe model’s framework type, and the model uses .prototxt as suffix.

FmkType.ONNX

ONNX model’s framework type, and the model uses .onnx as suffix.

FmkType.MINDIR

MindSpore model’s framework type, and the model uses .mindir as suffix.

FmkType.TFLITE

TensorFlow Lite model’s framework type, and the model uses .tflite as suffix.

FmkType.PYTORCH

PyTorch model’s framework type, and the model uses .pt or .pth as suffix.

Examples

>>> # Method 1: Import mindspore_lite package
>>> import mindspore_lite as mslite
>>> print(mslite.FmkType.TF)
FmkType.TF
>>> # Method 2: from mindspore_lite package import FmkType
>>> from mindspore_lite import FmkType
>>> print(FmkType.TF)
FmkType.TF