日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

coreML 初窥

發布時間:2023/12/20 编程问答 36 豆豆
生活随笔 收集整理的這篇文章主要介紹了 coreML 初窥 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

coreML 初窺

本文章主要介紹對于CoreML Foundation的簡單實用,不深入涉及Machine Learn(自己對于ML知識還很淺):

  • CoreML相關簡介

  • 例子使用講解


CoreML相關簡介

2017-06-06 Apple 在WWDC2017大會上推出CoreML框架

  • Core ML lets you integrate a broad variety of machine learning model types into your app. In addition to supporting extensive deep learning with over 30 layer types, it also supports standard models such as tree ensembles, SVMs, and generalized linear models. Because it’s built on top of low level technologies like Metal and Accelerate, Core ML seamlessly takes advantage of the CPU and GPU to provide maximum performance and efficiency. You can run machine learning models on the device so data doesn’t need to leave the device to be analyzed.

  • 以上內容大概翻譯過來就是:CoreML可以集成多種機器學習模型類型到您的應用程序。它除了支持超多30 layer的機器學習,還支持多種標準的模型,比如: tree ensembles, SVMs, and generalized linear models。它建立于底層的技術類似Metal 和 Accelertate,因此能最大的利用CPU和GPU提供性能和效率。并且您可以直接在設備上直接運行機器模型,不需要數據離開設備進行分析。


例子使用講解

  • 建立的工程導入CoreML 框架

  • 導入*.mlmodel, 通過Xcode可以看到這個mlmodel的相關信息,包括model的類型,作者,Model Class ,輸入參數,輸出參數等信息;。

  • 根據Apple的說法,導入mlmodel后,Xcode也根據model信息自動生成一個自定義編程接口模型,可以用它來與模型交互的代碼。具體它什么時候轉出代碼,目前我還沒找到。剛開始我根據它的swift例子編寫obj例子,我把mlmodel導入的時候,然后編譯了好久都沒看到自動生成的接口model,然后我就不停的command+b,突然我就能看到了。然后在我的一個新項目中,使用了另外一個mlmodel,編譯好久也還沒看到生成的接口模型。這里比較奇怪,也還沒找到對應的說法,也可能是xcode問題,稍后會研究。

[1]: https://developer.apple.com/machine-learning/ apple關于machine learning的介紹

[2]: https://developer.apple.com/documentation/coreml/integrating_a_core_ml_model_into_your_app apple 關于coreML例子

[3]: https://github.com/hxming2919/IntegratingaCoreMLModelintoYourApp_obj 使用obj重寫apple coreML例子

總結

以上是生活随笔為你收集整理的coreML 初窥的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。