发货后连续训练CoreML模型 [英] Continuously train CoreML model after shipping

查看:142
本文介绍了发货后连续训练CoreML模型的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在查看新的CoreML API时,在生成.mlmodel并将其捆绑到您的应用程序中之后,我看不到任何继续训练模型的方法.这使我认为我无法对用户的内容或动作进行机器学习,因为必须事先对模型进行全面培训.

In looking over the new CoreML API, I don't see any way to continue training the model after generating the .mlmodel and bundling it in your app. This makes me think that I won't be able to perform machine learning on my user's content or actions because the model must be entirely trained beforehand.

有没有办法在发货后将训练数据添加到我的训练过的模型中?

Is there any way to add training data to my trained model after shipping?

我刚刚注意到您可以从URL初始化生成的模型类,所以也许我可以将新的训练数据发布到我的服务器上,重新生成训练后的模型并将其下载到应用程序中?似乎可以正常工作,但这完全破坏了在无需用户数据离开设备的情况下能够使用ML的隐私方面.

I just noticed you could initialize a generated model class from a URL, so perhaps I can post new training data to my server, re-generate the trained model and download it into the app? Seems like it would work, but this completely defeats the privacy aspect of being able to use ML without the user's data leaving the device.

推荐答案

Xcode将.mlmodel文件编译为.mlmodelc结构(实际上是应用程序捆绑包中的文件夹).

The .mlmodel file is compiled by Xcode into a .mlmodelc structure (which is actually a folder inside your app bundle).

您的应用程序可能能够从服务器下载新的.mlmodel,但我认为您无法从应用程序内部运行Core ML编译器.

Your app might be able to download a new .mlmodel from a server but I don't think you can run the Core ML compiler from inside your app.

也许您的应用程序可以从服务器下载已编译的.mlmodelc数据,将其复制到应用程序的Documents目录中,然后从中实例化模型.试试看. ;-)

Maybe it is possible for your app to download the compiled .mlmodelc data from a server, copy it into the app's Documents directory, and instantiate the model from that. Try it out. ;-)

(这假定App Store在打包您的应用并将其交付给用户之前,不会对.mlmodelc数据进行任何其他处理.)

(This assumes the App Store does not do any additional processing on the .mlmodelc data before it packages up your app and ships it to the user.)

这篇关于发货后连续训练CoreML模型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆