简体   繁体   English

我可以将所有tensorflow slim模型转换为tflite吗?

[英]Can I convert all the tensorflow slim models to tflite?

I'm training tensorflow slim based models for image classification on a custom dataset. 我正在训练基于tensorflow slim的模型,以便在自定义数据集上进行图像分类。 Before I invest a lot of time training such huge a dataset, I wanted to know whether or not can I convert all the models available in the slim model zoo to tflite format. 在投入大量时间训练如此庞大的数据集之前,我想知道是否可以将苗条模型动物园中可用的所有模型转换为tflite格式。

Also, I know that I can convert my custom slim-model to a frozen graph. 另外,我知道我可以将自定义苗条模型转换为冻结图。 It is the step after this which I'm worried about ie, conversion to .tflite from my custom trained .pb model. 这是我担心的后续步骤,即从经过定制培训的.pb模型转换为.tflite。

Is this supported ? 支持吗? or is there anyone who is facing conversion problems that has not yet been resolved ? 还是有人面临尚未解决的转换问题?

Thanks. 谢谢。

Many Slim models can be converted to TFLite, but it isn't a guarantee since some models might have ops not supported by TFLite. 许多Slim模型可以转换为TFLite,但这不是保证,因为某些模型可能具有TFLite不支持的操作。

What you could do, is try and convert your model to TensorFlow Lite using TFLiteConverter in Python before training. 您可以做的是,在训练之前尝试使用Python中的TFLiteConverter将模型转换为TensorFlow Lite。 If the conversion succeeds, then you can train your TF model and convert it once again. 如果转换成功,则可以训练TF模型并再次进行转换。

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

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