简体   繁体   English

如何将 a.h5 model 转换为 a.tflite 并获取图像标签?

[英]How to convert a .h5 model to a .tflite and also get image labels?

I am pretty new to Deep Learning, I have a custom dataset which is quite large, how do I convert the.h5 model to a.tflite model and also how do I generate all the labels without doing it manually?我对深度学习很陌生,我有一个非常大的自定义数据集,如何将.h5 model 转换为 a.tflite model 以及如何在不手动操作的情况下生成所有标签?

From Tensorflow documentation来自 Tensorflow 文档

Convert the model转换 model

converter = tf.lite.TFLiteConverter.from_saved_model(saved_model_dir) # path to the SavedModel directory
tflite_model = converter.convert()

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM