TensorFlow Lite Model Maker

TensorFlow Lite Model Maker

TensorFlow Lite Model Maker 库,可以简化使用自定义数据集训练 TensorFlow Lite 模型的过程。该库使用迁移学习来减少所需的训练数据量并缩短训练时间。

例,图像分类,四行代码

# Load input data specific to an on-device ML app.
data = ImageClassifierDataLoader.from_folder('flower_photos/')
train_data, test_data = data.split(0.9)

# Customize the TensorFlow model.
model = image_classifier.create(train_data)

# Evaluate the model.
loss, accuracy = model.evaluate(test_data)

# Export to Tensorflow Lite model and label file in `export_dir`.
model.export(export_dir='/tmp/')

安装

pip install tflite-model-maker

TensorFlow Lite Model Maker_第1张图片

cd examples/tensorflow_examples/lite/model_maker/pip_package
pip install -e .

你可能感兴趣的:(tflite,tensorflow2,tensorflow,深度学习,机器学习)