(译文)TensorFlowLite

TensorFlow Lite是Google推出的轻量级机器学习框架,专为移动和嵌入式设备设计。它支持快速模型加载和硬件加速,确保了良好的性能表现。该框架包含多个组件,如TensorFlowLiteConverter用于转换模型格式,Interpreter负责模型执行。已支持多种预训练模型,如MobileNet和Inceptionv3等。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Google基于TensorFlow针对移动和嵌入式设备轻量级的机器学习框架。

  • 轻量级

    启用具有较小二进制大小并且快速初始化/启动设备上机器学习模型。

  • 跨平台

    可以运行设计跑到许多不同的平台上,从Android和IOS上开始

  • 快速

    针对移动设备进行了优化,包括显着提高的模型加载时间,并支持硬件加速

目前越来越多的移动设备采用专用的定制硬件来更有效地处理机器学习工作负载。 TensorFlow Lite支持Android神经​​网络API,可充分利用这些新的加速器。

当加速设备不支持时,TensorFlow Lite退回到CPU上执行,确保你的模型仍然可以在大量设备上快速运行。

架构

TensorFlow Lite:的架构设计

模块组件:

  • TensorFlow Model:存储在硬盘上一个训练好的TensorFlow 模型。

  • TensorFlow Lite Converter:将模型转化为TensorFlow Lite文件格式的程序。

  • TensorFlow Lite Model File:对基于FlatBuffers的模型文件格式做了优化,使其速度最快,规格最小。

TensorFlow Lite Model File 可以部署到移动APP上,在

  • Java API : Android上C++API的便捷封装

  • C++ API : 加载TensorFlowLite 模型文件并调用解释器。在Android和IOS上调用同样的类库。

  • Interpreter : 使用一组运算符来执行模型。解释器支持选择操作加载;如果没有运算符加载,只支持70KB,加载所有的运算符之后为300KB。与TensorFlow Mobile所需的1.5M相比,这是一个明显的降低(使用一个普通操作符集)。

  • 在选择安卓设备上,解析器支持Android神经网络API来进行硬件加速。或者默认使用CPU,如果没有可用的加速器的话

开发者可以使用C++API来实现自定义的kernels。

Models

TensorFlow Lite 在移动设备已经支持大量的训练好的模型和优化好的模型。

  • MobileNet : 能够识别1000种不同对象类的视觉模型,在移动设备和嵌入式设备上高效执行而设计。

  • Inception v3 : 图像识别模型,和MobileNet有相似的功能,提供高精度,但相对也是更大

  • Smart Reply:设备会话模型,可以即时回复聊天消息。在Android Wear上使用此功能。

Inception v3和MobileNet在ImageNet数据集上训练。你可以很容易地利用迁移学习对你自己的图像数据集进行再训练。


博主困了,下面这段不翻译了


What About TensorFlow Mobile?

As you may know, TensorFlow already supports mobile and embedded deployment of models through the TensorFlow Mobile API. Going forward, TensorFlow Lite should be seen as the evolution of TensorFlow Mobile, and as it matures it will become the recommended solution for deploying models on mobile and embedded devices. With this announcement, TensorFlow Lite is made available as a developer preview, and TensorFlow Mobile is still there to support production apps.

The scope of TensorFlow Lite is large and still under active development. With this developer preview, we have intentionally started with a constrained platform to ensure performance on some of the most important common models. We plan to prioritize future functional expansion based on the needs of our users. The goals for our continued development are to simplify the developer experience, and enable model deployment for a range of mobile and embedded devices.

We are excited that developers are getting their hands on TensorFlow Lite. We plan to support and address our external community with the same intensity as the rest of the TensorFlow project. We can’t wait to see what you can do with TensorFlow Lite.
For more information, check out the TensorFlow Lite documentation pages.
Stay tuned for more updates.
Happy TensorFlow Lite coding!


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值