{"id":24491,"date":"2024-05-29T12:45:30","date_gmt":"2024-05-29T04:45:30","guid":{"rendered":"https:\/\/www.yimenyun.cn\/emen\/?p=24491"},"modified":"2024-05-29T12:45:30","modified_gmt":"2024-05-29T04:45:30","slug":"tf%e4%b8%8a%e6%9e%b6%e7%9a%84app%e5%9c%a8%e8%8b%b9%e6%9e%9c%e5%95%86%e5%ba%97%e8%83%bd%e4%b8%8b%e8%bd%bd%ef%bc%9f","status":"publish","type":"post","link":"https:\/\/www.yimenyun.cn\/emen\/24491\/","title":{"rendered":"tf\u4e0a\u67b6\u7684app\u5728\u82f9\u679c\u5546\u5e97\u80fd\u4e0b\u8f7d\uff1f"},"content":{"rendered":"

TensorFlow\u662f\u4e00\u6b3e\u4eba\u5de5\u667a\u80fd\u6846\u67b6\uff0c\u53ef\u7528\u4e8e\u5f00\u53d1\u5404\u79cd\u5e94\u7528\uff0c\u5305\u62ec\u56fe\u50cf\u8bc6\u522b\u3001\u8bed\u97f3\u8bc6\u522b\u3001\u81ea\u7136\u8bed\u8a00\u5904\u7406\u7b49\u3002TensorFlow\u63d0\u4f9b\u4e86\u4e00\u79cd\u7b80\u5355\u7684\u65b9\u5f0f\uff0c\u4f7f\u5f00\u53d1\u8005\u80fd\u591f\u4f7f\u7528Python\u7b49\u8bed\u8a00\u6784\u5efa\u795e\u7ecf\u7f51\u7edc\uff0c\u8fd9\u4e9b\u795e\u7ecf\u7f51\u7edc\u53ef\u4ee5\u5728\u4e0d\u540c\u7684\u5e73\u53f0\u4e0a\u8fd0\u884c\uff0c\u5305\u62ec\u624b\u673a\u3001\u5e73\u677f\u7535\u8111\u548c\u53f0\u5f0f\u673a\u7b49\u3002TensorFlow\u8fd8\u63d0\u4f9b\u4e86\u4e00\u79cd\u7b80\u5355\u7684\u65b9\u5f0f\uff0c\u4f7f\u5f00\u53d1\u8005\u80fd\u591f\u5c06\u5df2\u8bad\u7ec3\u597d\u7684\u6a21\u578b\u5bfc\u51fa\u4e3a\u5404\u79cd\u683c\u5f0f\uff0c\u5305\u62eciOS\u5e94\u7528\u7a0b\u5e8f\u5305\uff08.ipa\uff09\u3002<\/p>\n

\u5728iOS\u4e0a\u8fd0\u884cTensorFlow\u6a21\u578b\u9700\u8981\u4f7f\u7528TensorFlow Lite\u6846\u67b6\uff0c\u8be5\u6846\u67b6\u63d0\u4f9b\u4e86\u4e00\u79cd\u7b80\u5355\u7684\u65b9\u5f0f\uff0c\u4f7f\u5f00\u53d1\u8005\u80fd\u591f\u5c06TensorFlow\u6a21\u578b\u5d4c\u5165\u5230iOS\u5e94\u7528\u7a0b\u5e8f\u4e2d\u3002TensorFlow Lite\u6846\u67b6\u5305\u542b\u4e00\u4e2aiOS\u9759\u6001\u5e93\uff0c\u53ef\u4ee5\u5728Xcode\u4e2d\u4f7f\u7528Objective-C\u6216Swift\u7f16\u5199\u4ee3\u7801\uff0c\u4ee5\u4fbf\u5c06TensorFlow\u6a21\u578b\u5d4c\u5165\u5230iOS\u5e94\u7528\u7a0b\u5e8f\u4e2d\u3002TensorFlow Lite\u6846\u67b6\u8fd8\u5305\u542b\u4e00\u4e2a\u547d\u4ee4\u884c\u5de5\u5177\uff0c\u53ef\u4ee5\u5c06TensorFlow\u6a21\u578b\u8f6c\u6362\u4e3aTensorFlow Lite\u683c\u5f0f\uff0c\u4ee5\u4fbf\u5728iOS\u5e94\u7528\u7a0b\u5e8f\u4e2d\u4f7f\u7528\u3002<\/p>\n

TensorFlow Lite\u6846\u67b6\u7684\u6838\u5fc3\u662f\u4e00\u4e2a\u540d\u4e3aInterpreter\u7684\u7c7b\uff0c\u8be5\u7c7b\u63d0\u4f9b\u4e86\u4e00\u79cd\u7b80\u5355\u7684\u65b9\u5f0f\uff0c\u4f7f\u5f00\u53d1\u8005\u80fd\u591f\u5728iOS\u8bbe\u5907\u4e0a\u8fd0\u884cTensorFlow\u6a21\u578b\u3002\u5f00\u53d1\u8005\u53ef\u4ee5\u4f7f\u7528Interpreter\u7c7b\u52a0\u8f7dTensorFlow\u6a21\u578b\uff0c\u5e76\u4f7f\u7528\u8f93<\/p>\n

<\/figure>\n<\/p>\n

\u5165\u6570\u636e\u8fd0\u884c\u6a21\u578b\u3002Interpreter\u7c7b\u8fd8\u63d0\u4f9b\u4e86\u4e00\u79cd\u7b80\u5355\u7684\u65b9\u5f0f\uff0c\u4f7f\u5f00\u53d1\u8005\u80fd\u591f\u5c06\u6a21\u578b\u8f93\u51fa\u8f6c\u6362\u4e3aiOS\u5e94\u7528\u7a0b\u5e8f\u53ef\u4ee5\u8bc6\u522b\u7684\u683c\u5f0f\uff0c\u4f8b\u5982UIImage\u6216NSData\u3002<\/p>\n

\u8981\u5728\u82f9\u679c\u5546\u5e97\u4e0a\u67b6TensorFlow\u5e94\u7528\u7a0b\u5e8f\uff0c\u5f00\u53d1\u8005\u9700\u8981\u9075\u5faa\u82f9\u679c\u7684\u5ba1\u6838\u89c4\u5219\u3002\u82f9\u679c\u8981\u6c42\u6240\u6709\u5e94\u7528\u7a0b\u5e8f\u5fc5\u987b\u7b26\u5408\u5176\u5ba1\u6838\u89c4\u5219\uff0c\u4ee5\u786e\u4fdd\u5e94\u7528\u7a0b\u5e8f\u7684\u8d28\u91cf\u548c\u5b89\u5168\u6027\u3002\u5f00\u53d1\u8005\u5e94\u786e\u4fdd\u5176\u5e94\u7528\u7a0b\u5e8f\u7b26\u5408\u82f9\u679c\u7684\u5ba1\u6838\u89c4\u5219\uff0c\u5e76\u9075\u5faa\u82f9\u679c\u7684\u5f00\u53d1\u6307\u5357\u3002<\/p>\n

\u5f00\u53d1\u8005\u5e94\u8be5\u786e\u4fdd\u5176\u5e94\u7528\u7a0b\u5e8f\u5305\u542b\u6709\u5173\u82f9\u679cAPP\u4e0a\u67b6<\/a>TensorFlow\u7684\u4fe1\u606f\uff0c\u5305\u62ec\u4f7f\u7528\u7684\u7248\u672c\u548c\u8bb8\u53ef\u8bc1\u4fe1\u606f\u3002\u5f00\u53d1\u8005\u8fd8\u5e94\u8be5\u63d0\u4f9b\u6709\u5173\u5e94\u7528\u7a0b\u5e8f\u5982\u4f55\u4f7f\u7528TensorFlow\u6a21\u578b\u7684\u4fe1\u606f\uff0c\u4ee5\u53ca\u5982\u4f55\u4fdd\u62a4\u7528\u6237\u6570\u636e\u7684\u4fe1\u606f\u3002\u5f00\u53d1\u8005\u8fd8\u5e94\u8be5\u786e\u4fdd\u5176\u5e94\u7528\u7a0b\u5e8f\u4e0d\u4f1a\u4fb5\u72af\u4efb\u4f55\u7b2c\u4e09\u65b9\u7684\u77e5\u8bc6\u4ea7\u6743\uff0c\u4f8b\u5982\u4e13\u5229\u3001\u5546\u6807\u6216\u7248\u6743\u3002<\/p>\n

\u603b\u4e4b\uff0cTensorFlow\u5e94\u7528\u7a0b\u5e8f\u53ef\u4ee5\u5728\u82f9\u679c\u5546\u5e97\u4e0a\u67b6\uff0c\u4f46\u9700\u8981\u9075\u5faa\u82f9\u679c\u7684\u5ba1\u6838\u89c4\u5219\uff0c\u5e76\u786e\u4fdd\u5e94\u7528\u7a0b\u5e8f\u7b26\u5408\u82f9\u679c\u7684\u5f00\u53d1\u6307\u5357\u3002\u5f00\u53d1\u8005\u5e94\u8be5\u63d0\u4f9b\u6709\u5173TensorFlow\u7684\u4fe1\u606f\uff0c\u5305\u62ec\u4f7f\u7528\u7684\u7248\u672c\u548c\u8bb8\u53ef\u8bc1\u4fe1\u606f\uff0c\u4ee5\u53ca\u5982\u4f55\u4fdd\u62a4\u7528\u6237\u6570\u636e\u7684\u4fe1\u606f\u3002\u5f00\u53d1\u8005\u8fd8\u5e94\u8be5\u786e\u4fdd\u5176\u5e94\u7528\u7a0b\u5e8f\u4e0d\u4f1a\u4fb5\u72af\u4efb\u4f55\u7b2c\u4e09\u65b9\u7684\u77e5\u8bc6\u4ea7\u6743\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"

TensorFlow\u662f\u4e00\u6b3e\u4eba\u5de5\u667a\u80fd\u6846\u67b6\uff0c\u53ef\u7528\u4e8e\u5f00\u53d1\u5404\u79cd\u5e94\u7528\uff0c\u5305\u62ec\u56fe\u50cf\u8bc6\u522b\u3001\u8bed\u97f3\u8bc6\u522b\u3001\u81ea\u7136\u8bed\u8a00\u5904\u7406\u7b49\u3002TensorFlow\u63d0\u4f9b\u4e86\u4e00\u79cd\u7b80\u5355\u7684\u65b9\u5f0f\uff0c\u4f7f\u5f00\u53d1\u8005\u80fd\u591f\u4f7f\u7528Python\u7b49\u8bed\u8a00\u6784\u5efa\u795e\u7ecf\u7f51\u7edc\uff0c\u8fd9\u4e9b\u795e\u7ecf<\/p>\n","protected":false},"author":6,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[24868,12,17,3794,24869],"topic":[],"class_list":["post-24491","post","type-post","status-publish","format-standard","hentry","category-appsj","tag-app","tag-12","tag-17","tag-3794","tag-24869"],"_links":{"self":[{"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/posts\/24491","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/comments?post=24491"}],"version-history":[{"count":1,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/posts\/24491\/revisions"}],"predecessor-version":[{"id":24550,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/posts\/24491\/revisions\/24550"}],"wp:attachment":[{"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/media?parent=24491"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/categories?post=24491"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/tags?post=24491"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/topic?post=24491"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}