{"id":10035,"date":"2021-01-14T09:06:00","date_gmt":"2021-01-14T05:36:00","guid":{"rendered":"https:\/\/shahaab-co.com\/mag\/?p=10035"},"modified":"2021-01-13T12:40:46","modified_gmt":"2021-01-13T09:10:46","slug":"tenserflow-lite-model-on-android","status":"publish","type":"post","link":"https:\/\/shahaab-co.com\/mag\/edu\/deep-learning\/tenserflow-lite-model-on-android\/","title":{"rendered":"\u0631\u0627\u0647 \u0627\u0646\u062f\u0627\u0632\u06cc TensorFlow Lite \u0631\u0648\u06cc \u0627\u0646\u062f\u0631\u0648\u06cc\u062f"},"content":{"rendered":"<p style=\"text-align: justify;\">\u062f\u0631 \u0627\u06cc\u0646 \u0645\u0642\u0627\u0644\u0647\u060c \u0646\u062d\u0648\u0647 \u0628\u0627\u0631\u06af\u0630\u0627\u0631\u06cc \u0645\u062f\u0644 .tflite \u0631\u0648\u06cc \u0627\u067e\u0644\u06cc\u06a9\u06cc\u0634\u0646 \u0647\u0627\u06cc \u0627\u0646\u062f\u0631\u0648\u06cc\u062f \u0648 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 \u0622\u0646 \u0628\u0631\u0627\u06cc \u0627\u0646\u062c\u0627\u0645 \u067e\u06cc\u0634 \u0628\u06cc\u0646\u06cc \u0631\u0627 \u062e\u0648\u0627\u0647\u06cc\u062f \u0622\u0645\u0648\u062e\u062a.<\/p>\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_76 counter-hierarchy ez-toc-counter-rtl ez-toc-custom ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">\u0622\u0646\u0686\u0647 \u062f\u0631 \u0627\u06cc\u0646 \u0645\u0637\u0644\u0628 \u062e\u0648\u0627\u0647\u06cc\u0645 \u062e\u0648\u0627\u0646\u062f :<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #0044bf;color:#0044bf\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #0044bf;color:#0044bf\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 eztoc-toggle-hide-by-default' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/shahaab-co.com\/mag\/edu\/deep-learning\/tenserflow-lite-model-on-android\/#TensorFlow_Lite_%DA%86%DB%8C%D8%B3%D8%AA%D8%9F\" >TensorFlow Lite \u0686\u06cc\u0633\u062a\u061f<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/shahaab-co.com\/mag\/edu\/deep-learning\/tenserflow-lite-model-on-android\/#%DA%86%DA%AF%D9%88%D9%86%D9%87_%D9%85%DB%8C_%D8%AA%D9%88%D8%A7%D9%86_%D9%BE%D8%A7%D8%B1%D8%A7%D9%85%D8%AA%D8%B1_%D9%87%D8%A7%DB%8C_%D9%88%D8%B1%D9%88%D8%AF%DB%8C_%D9%88_%D8%AE%D8%B1%D9%88%D8%AC%DB%8C_%D9%85%D8%AF%D9%84_tflite_%D8%B1%D8%A7_%D9%BE%DB%8C%D8%AF%D8%A7_%DA%A9%D8%B1%D8%AF%D8%9F\" >\u0686\u06af\u0648\u0646\u0647 \u0645\u06cc \u062a\u0648\u0627\u0646 \u067e\u0627\u0631\u0627\u0645\u062a\u0631 \u0647\u0627\u06cc \u0648\u0631\u0648\u062f\u06cc \u0648 \u062e\u0631\u0648\u062c\u06cc \u0645\u062f\u0644 .tflite \u0631\u0627 \u067e\u06cc\u062f\u0627 \u06a9\u0631\u062f\u061f<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/shahaab-co.com\/mag\/edu\/deep-learning\/tenserflow-lite-model-on-android\/#%DA%86%DA%AF%D9%88%D9%86%D9%87_%D9%85%DB%8C_%D8%AA%D9%88%D8%A7%D9%86%DB%8C%D9%85_%D9%85%D8%AF%D9%84_tflite_%D8%B1%D8%A7_%D8%A8%D9%87_%D8%A7%D9%BE%D9%84%DB%8C%DA%A9%DB%8C%D8%B4%D9%86_%D8%A7%D9%86%D8%AF%D8%B1%D9%88%DB%8C%D8%AF_%D8%A7%D8%B6%D8%A7%D9%81%D9%87_%DA%A9%D9%86%DB%8C%D9%85%D8%9F\" >\u0686\u06af\u0648\u0646\u0647 \u0645\u06cc \u062a\u0648\u0627\u0646\u06cc\u0645 \u0645\u062f\u0644 .tflite \u0631\u0627 \u0628\u0647 \u0627\u067e\u0644\u06cc\u06a9\u06cc\u0634\u0646 \u0627\u0646\u062f\u0631\u0648\u06cc\u062f \u0627\u0636\u0627\u0641\u0647 \u06a9\u0646\u06cc\u0645\u061f<\/a><\/li><\/ul><\/nav><\/div>\n<h2 style=\"text-align: justify;\"><span class=\"ez-toc-section\" id=\"TensorFlow_Lite_%DA%86%DB%8C%D8%B3%D8%AA%D8%9F\"><\/span><strong>TensorFlow Lite \u0686\u06cc\u0633\u062a\u061f<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p style=\"text-align: justify;\">TensorFlow Lite \u06cc\u0627 .tflite \u06cc\u06a9 \u0646\u0633\u062e\u0647 \u0633\u0628\u06a9 \u0627\u0632 \u0641\u0631\u06cc\u0645 \u0648\u0631\u06a9 \u06cc\u0627\u062f\u06af\u06cc\u0631\u06cc \u0645\u0627\u0634\u06cc\u0646 \u0645\u0646\u0628\u0639 \u0628\u0627\u0632 \u06af\u0648\u06af\u0644 \u0627\u0633\u062a.\u00a0 \u0645\u062f\u0644 \u0647\u0627\u06cc .tflite \u0628\u0647 \u0637\u0648\u0631 \u0645\u062e\u0635\u0648\u0635 \u0628\u0631\u0627\u06cc \u062f\u0633\u062a\u06af\u0627\u0647 \u0647\u0627\u06cc \u0645\u0648\u0628\u0627\u06cc\u0644 \u06cc\u0627 \u0633\u06cc\u0633\u062a\u0645 \u0647\u0627\u06cc \u062a\u062c\u0645\u06cc\u0639 \u0634\u062f\u0647 \u0637\u0631\u0627\u062d\u06cc \u0634\u062f\u0647 \u0627\u0646\u062f.<\/p>\n<p style=\"text-align: justify;\">\u0628\u0627 \u0627\u06cc\u0646 \u062d\u0627\u0644 .tflite \u062a\u0646\u0647\u0627 \u0645\u06cc \u062a\u0648\u0627\u0646\u062f \u0645\u062f\u0644 \u0647\u0627\u06cc \u0627\u0632 \u067e\u06cc\u0634 \u0622\u0645\u0627\u062f\u0647 \u0631\u0627 \u0628\u0631\u0627\u06cc \u062f\u0633\u062a\u06af\u0627\u0647 \u0647\u0627\u06cc \u0645\u0648\u0628\u0627\u06cc\u0644 \u06cc\u0627 \u062a\u062c\u0645\u06cc\u0639 \u0634\u062f\u0647 \u062a\u0648\u0633\u0639\u0647 \u062f\u0647\u062f. \u0628\u0631\u0627\u06cc \u0622\u0645\u0648\u0632\u0634 \u0645\u062f\u0644 \u0647\u0627\u060c \u0628\u0627\u06cc\u062f \u0627\u0628\u062a\u062f\u0627 \u06cc\u06a9 \u0645\u062f\u0644 TensorFlow \u0633\u0627\u062e\u062a\u0647 \u0648 \u0633\u067e\u0633 \u0622\u0646 \u0631\u0627 \u0628\u0647 \u0641\u0631\u0645\u062a .tflite \u062a\u0628\u062f\u06cc\u0644 \u06a9\u0646\u06cc\u062f.<\/p>\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img decoding=\"async\" width=\"512\" height=\"472\" src=\"https:\/\/shahaab-co.com\/mag\/wp-content\/uploads\/2021\/01\/\u0645\u0639\u0645\u0627\u0631\u06cc-TensorFlow-Lite-\u0631\u0648\u06cc-\u0627\u0646\u062f\u0631\u0648\u06cc\u062f-\u0648-IOS.jpg\" alt=\"\u0645\u0639\u0645\u0627\u0631\u06cc TensorFlow Lite \u0631\u0648\u06cc \u0627\u0646\u062f\u0631\u0648\u06cc\u062f \u0648 IOS\" class=\"wp-image-10037\" title=\"\" srcset=\"https:\/\/shahaab-co.com\/mag\/wp-content\/uploads\/2021\/01\/\u0645\u0639\u0645\u0627\u0631\u06cc-TensorFlow-Lite-\u0631\u0648\u06cc-\u0627\u0646\u062f\u0631\u0648\u06cc\u062f-\u0648-IOS.jpg 512w, https:\/\/shahaab-co.com\/mag\/wp-content\/uploads\/2021\/01\/\u0645\u0639\u0645\u0627\u0631\u06cc-TensorFlow-Lite-\u0631\u0648\u06cc-\u0627\u0646\u062f\u0631\u0648\u06cc\u062f-\u0648-IOS-300x277.jpg 300w\" sizes=\"(max-width: 512px) 100vw, 512px\" \/><\/figure><\/div>\n\n\n<h2 style=\"text-align: justify;\"><span class=\"ez-toc-section\" id=\"%DA%86%DA%AF%D9%88%D9%86%D9%87_%D9%85%DB%8C_%D8%AA%D9%88%D8%A7%D9%86_%D9%BE%D8%A7%D8%B1%D8%A7%D9%85%D8%AA%D8%B1_%D9%87%D8%A7%DB%8C_%D9%88%D8%B1%D9%88%D8%AF%DB%8C_%D9%88_%D8%AE%D8%B1%D9%88%D8%AC%DB%8C_%D9%85%D8%AF%D9%84_tflite_%D8%B1%D8%A7_%D9%BE%DB%8C%D8%AF%D8%A7_%DA%A9%D8%B1%D8%AF%D8%9F\"><\/span><strong>\u0686\u06af\u0648\u0646\u0647 \u0645\u06cc \u062a\u0648\u0627\u0646 \u067e\u0627\u0631\u0627\u0645\u062a\u0631 \u0647\u0627\u06cc \u0648\u0631\u0648\u062f\u06cc \u0648 \u062e\u0631\u0648\u062c\u06cc \u0645\u062f\u0644 .tflite \u0631\u0627 \u067e\u06cc\u062f\u0627 \u06a9\u0631\u062f\u061f<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p style=\"text-align: justify;\">\u0645\u0627 \u0628\u0627\u06cc\u062f \u067e\u0627\u0631\u0627\u0645\u062a\u0631 \u0647\u0627\u06cc \u0648\u0631\u0648\u062f\u06cc \u0648 \u062e\u0631\u0648\u062c\u06cc \u0645\u062f\u0644 .tflite \u0631\u0627 \u0628\u06cc\u0627\u0628\u06cc\u0645. \u0628\u0631\u0627\u06cc \u0627\u06cc\u0646 \u06a9\u0627\u0631 \u0645\u06cc \u062a\u0648\u0627\u0646\u06cc\u0645 \u0627\u0632 <a href=\"https:\/\/lutzroeder.github.io\/netron\/\" target=\"_blank\" rel=\"noopener noreferrer\">Netron<\/a> \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u06a9\u0631\u062f\u0647 \u0648 \u0645\u062f\u0644 \u062e\u0648\u062f \u0631\u0627 \u062f\u0631 \u0622\u0646 \u0622\u067e\u0644\u0648\u062f \u06a9\u0646\u06cc\u0645.<\/p>\n<p style=\"text-align: justify;\">\u0648\u0631\u0648\u062f\u06cc \u0648 \u062e\u0631\u0648\u062c\u06cc \u0645\u062f\u0644 \u0628\u0647 \u0635\u0648\u0631\u062a \u0632\u06cc\u0631 \u062e\u0648\u0627\u0647\u0646\u062f \u0628\u0648\u062f.<\/p>\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img decoding=\"async\" width=\"700\" height=\"569\" src=\"https:\/\/shahaab-co.com\/mag\/wp-content\/uploads\/2021\/01\/\u0648\u0631\u0648\u062f\u06cc-\u0648-\u062e\u0631\u0648\u062c\u06cc-\u0645\u062f\u0644-TensorFlow-Lite-\u062f\u0631-\u0627\u0646\u062f\u0631\u0648\u06cc\u062f.png\" alt=\"\u0648\u0631\u0648\u062f\u06cc \u0648 \u062e\u0631\u0648\u062c\u06cc \u0645\u062f\u0644 TensorFlow Lite \u062f\u0631 \u0627\u0646\u062f\u0631\u0648\u06cc\u062f\" class=\"wp-image-10038\" title=\"\" srcset=\"https:\/\/shahaab-co.com\/mag\/wp-content\/uploads\/2021\/01\/\u0648\u0631\u0648\u062f\u06cc-\u0648-\u062e\u0631\u0648\u062c\u06cc-\u0645\u062f\u0644-TensorFlow-Lite-\u062f\u0631-\u0627\u0646\u062f\u0631\u0648\u06cc\u062f.png 700w, https:\/\/shahaab-co.com\/mag\/wp-content\/uploads\/2021\/01\/\u0648\u0631\u0648\u062f\u06cc-\u0648-\u062e\u0631\u0648\u062c\u06cc-\u0645\u062f\u0644-TensorFlow-Lite-\u062f\u0631-\u0627\u0646\u062f\u0631\u0648\u06cc\u062f-300x244.png 300w\" sizes=\"(max-width: 700px) 100vw, 700px\" \/><\/figure><\/div>\n\n\n<p style=\"text-align: justify;\">\u062f\u0631 \u0646\u062a\u06cc\u062c\u0647\u060c \u0645\u062f\u0644 \u0628\u0647 \u06cc\u06a9 \u0639\u06a9\u0633 RGB \u0628\u0627 \u0627\u0646\u062f\u0627\u0631\u0647 \u06f2\u06f2\u06f4*\u06f2\u06f2\u06f4 \u0628\u0647 \u0639\u0646\u0648\u0627\u0646 \u0648\u0631\u0648\u062f\u06cc \u0646\u06cc\u0627\u0632\u0645\u0646\u062f \u0627\u0633\u062a \u0648 \u062e\u0631\u0648\u062c\u06cc \u0622\u0646 \u06cc\u06a9 \u0622\u0631\u0627\u06cc\u0647 \u06f2 \u0628\u0639\u062f\u06cc \u0634\u0627\u0645\u0644 \u06cc\u06a9 \u0631\u062f\u06cc\u0641 \u06a9\u0647 \u0645\u062a\u0634\u06a9\u0644 \u0627\u0632 \u06f1\u06f4\u06f9 \u0634\u06cc \u0627\u0633\u062a\u060c \u0645\u06cc \u0628\u0627\u0634\u062f.<\/p>\n<h2 style=\"text-align: justify;\"><span class=\"ez-toc-section\" id=\"%DA%86%DA%AF%D9%88%D9%86%D9%87_%D9%85%DB%8C_%D8%AA%D9%88%D8%A7%D9%86%DB%8C%D9%85_%D9%85%D8%AF%D9%84_tflite_%D8%B1%D8%A7_%D8%A8%D9%87_%D8%A7%D9%BE%D9%84%DB%8C%DA%A9%DB%8C%D8%B4%D9%86_%D8%A7%D9%86%D8%AF%D8%B1%D9%88%DB%8C%D8%AF_%D8%A7%D8%B6%D8%A7%D9%81%D9%87_%DA%A9%D9%86%DB%8C%D9%85%D8%9F\"><\/span><strong>\u0686\u06af\u0648\u0646\u0647 \u0645\u06cc \u062a\u0648\u0627\u0646\u06cc\u0645 \u0645\u062f\u0644 .tflite \u0631\u0627 \u0628\u0647 \u0627\u067e\u0644\u06cc\u06a9\u06cc\u0634\u0646 \u0627\u0646\u062f\u0631\u0648\u06cc\u062f \u0627\u0636\u0627\u0641\u0647 \u06a9\u0646\u06cc\u0645\u061f<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p style=\"text-align: justify;\">\u0628\u0631\u0627\u06cc \u0627\u0636\u0627\u0641\u0647 \u06a9\u0631\u062f\u0646 \u0645\u062f\u0644\u060c \u0646\u0631\u0645 \u0627\u0641\u0632\u0627\u0631 Android Studio \u0631\u0627 \u0628\u0627\u0632 \u06a9\u0646\u06cc\u062f \u0648 \u0627\u0632 \u0645\u0646\u0648 \u201c<strong class=\"hf jf\">File -&gt; New Folder -&gt;<\/strong>\u201d \u06af\u0632\u06cc\u0646\u0647 \u06cc <strong class=\"hf jf\">Assets Folder\u00a0<\/strong>\u0631\u0627 \u0627\u0646\u062a\u062e\u0627\u0628 \u06a9\u0646\u06cc\u062f. \u0627\u06cc\u0646 \u06a9\u0627\u0631 \u06cc\u06a9 \u067e\u0648\u0634\u0647 Assets \u062f\u0631 \u0646\u0631\u0645 \u0627\u0641\u0632\u0627\u0631 \u0634\u0645\u0627 \u0627\u06cc\u062c\u0627\u062f \u0645\u06cc \u06a9\u0646\u062f \u06a9\u0647 \u0634\u0645\u0627 \u0628\u0627\u06cc\u062f \u0641\u0627\u06cc\u0644 .tflite \u062e\u0648\u062f \u0631\u0627 \u062f\u0631 \u0622\u0646 \u0642\u0631\u0627\u0631 \u062f\u0647\u06cc\u062f.<\/p>\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img decoding=\"async\" width=\"700\" height=\"179\" src=\"https:\/\/shahaab-co.com\/mag\/wp-content\/uploads\/2021\/01\/\u0627\u0636\u0627\u0641\u0647-\u06a9\u0631\u062f\u0646-\u0645\u062f\u0644-TensorFlow-Lite-\u0628\u0647-Android-Studio.png\" alt=\"\u0627\u0636\u0627\u0641\u0647 \u06a9\u0631\u062f\u0646 \u0645\u062f\u0644 TensorFlow Lite \u0628\u0647 Android Studio\" class=\"wp-image-10039\" title=\"\" srcset=\"https:\/\/shahaab-co.com\/mag\/wp-content\/uploads\/2021\/01\/\u0627\u0636\u0627\u0641\u0647-\u06a9\u0631\u062f\u0646-\u0645\u062f\u0644-TensorFlow-Lite-\u0628\u0647-Android-Studio.png 700w, https:\/\/shahaab-co.com\/mag\/wp-content\/uploads\/2021\/01\/\u0627\u0636\u0627\u0641\u0647-\u06a9\u0631\u062f\u0646-\u0645\u062f\u0644-TensorFlow-Lite-\u0628\u0647-Android-Studio-300x77.png 300w\" sizes=\"(max-width: 700px) 100vw, 700px\" \/><\/figure><\/div>\n\n\n<p>\u067e\u0633 \u0627\u0632 \u0627\u0636\u0627\u0641\u0647 \u06a9\u0631\u062f\u0646 \u0645\u062f\u0644 \u062f\u0631 \u067e\u0648\u0634\u0647 Assets \u060c \u0641\u0627\u06cc\u0644 <strong class=\"hf jf\">build.gradle\u00a0<\/strong>\u0631\u0627 \u0628\u0627\u0632 \u06a9\u0646\u06cc\u062f \u0648 \u0648\u0627\u0628\u0633\u062a\u06af\u06cc \u0647\u0627\u06cc \u0622\u0646 \u0631\u0627 \u0645\u0637\u0627\u0628\u0642 \u06a9\u062f \u0632\u06cc\u0631 \u0648\u0627\u0631\u062f \u06a9\u0646\u06cc\u062f.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"java\">dependencies {\n  implementation 'org.tensorflow:tensorflow-lite:+'\n}\n<\/pre>\n<p>\u0628\u0631\u0627\u06cc \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 \u0622\u0646\u060c \u0628\u0627\u06cc\u062f \u0628\u0627 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 \u0631\u0648\u0634 \u0632\u06cc\u0631 \u0645\u062f\u0644 \u0631\u0627 \u0627\u0632 \u067e\u0648\u0634\u0647 Assets \u0628\u0647 MappedByteBuffer \u0628\u0627\u0631\u06af\u0630\u0627\u0631\u06cc \u06a9\u0646\u06cc\u0645:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"java\">private MappedByteBuffer loadModelFile(Activity activity) throws IOException {\n  AssetFileDescriptor fileDescriptor = activity.getAssets().openFd(getModelPath());\n  FileInputStream inputStream = new  FileInputStream(fileDescriptor.getFileDescriptor());\n  FileChannel fileChannel = inputStream.getChannel();\n  long startOffset = fileDescriptor.getStartOffset();\n  long declaredLength = fileDescriptor.getDeclaredLength();\n  return fileChannel.map(FileChannel.MapMode.READ_ONLY, startOffset, declaredLength);\n}\n<\/pre>\n<p>\u0631\u0648\u0634 \u0628\u0627\u0644\u0627 \u0641\u0627\u06cc\u0644 .tflite\u00a0 \u0645\u0627 \u0631\u0627 \u062e\u0648\u0627\u0646\u062f\u0647 \u0648 \u06cc\u06a9 \u0634\u06cc MappedByteBuffer\u00a0 \u0628\u0647 \u0645\u0627 \u0645\u06cc \u062f\u0647\u062f. \u062f\u0631 \u0627\u062f\u0627\u0645\u0647 \u0645\u06cc \u062a\u0648\u0627\u0646\u06cc\u0645 \u0627\u0632 \u0627\u06cc\u0646 \u0634\u06cc \u0628\u0631\u0627\u06cc \u0633\u0627\u062e\u062a\u0646 <strong class=\"hf jf\">Interpreter\u00a0<\/strong>\u062e\u0648\u062f \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u06a9\u0646\u06cc\u0645<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"java\">protected Interpreter tflite;\ntflite = new Interpreter(loadModelFile(activity));\n<\/pre>\n<p>\u0633\u067e\u0633 \u0628\u0631\u0627\u06cc \u06a9\u0644\u0627\u0633\u0647 \u0628\u0646\u062f\u06cc \u0639\u06a9\u0633\u060c \u062a\u0645\u0627\u0645 \u06a9\u0627\u0631\u06cc \u06a9\u0647 \u0646\u06cc\u0627\u0632 \u0627\u0633\u062a \u0627\u0646\u062c\u0627\u0645 \u062f\u0647\u06cc\u0645 \u0627\u06cc\u0646 \u0627\u0633\u062a \u06a9\u0647 \u06a9\u062f Interpeter \u0631\u0627 \u0627\u062c\u0631\u0627 \u06a9\u0631\u062f\u0647\u060c \u062a\u0635\u0627\u0648\u06cc\u0631 \u062f\u0627\u062f\u0647 \u0648 \u0631\u0634\u062a\u0647 \u06cc \u0628\u0631\u0686\u0633\u0628 \u0647\u0627 \u0631\u0627 \u0628\u0647 \u0622\u0646 \u0628\u062f\u0647\u06cc\u0645 :<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"java\">tflite.run(imgData, labelProbArray);<\/pre>\n<p>\u062d\u0627\u0644\u0627 \u0628\u0627 \u0627\u06cc\u0646 \u06a9\u0627\u0631\u060c \u0645\u0627 \u0645\u06cc \u062a\u0648\u0627\u0646\u06cc\u0645 \u0627\u0632 \u0645\u062f\u0644 .tflte \u062e\u0648\u062f \u062e\u0631\u0648\u062c\u06cc \u06af\u0631\u0641\u062a\u0647 \u0648 \u067e\u0627\u0633\u062e \u067e\u06cc\u0634 \u0628\u06cc\u0646\u06cc \u0622\u0646 \u0631\u0627 \u0645\u0634\u0627\u0647\u062f\u0647 \u06a9\u0646\u06cc\u0645.<\/p>\n<h4><strong>\u0628\u06cc\u0634\u062a\u0631 \u0628\u062e\u0648\u0627\u0646\u06cc\u062f :<\/strong><\/h4>\n\n\n<div class=\"wp-block-group has-vivid-green-cyan-color has-text-color\"><div class=\"wp-block-group__inner-container is-layout-flow wp-block-group-is-layout-flow\">\n<ul class=\"wp-block-yoast-seo-related-links\"><li><a href=\"https:\/\/shahaab-co.com\/mag\/edu\/ml\/deep-learning-terminologies\/\">\u06f2\u06f0 \u0627\u0635\u0637\u0644\u0627\u062d \u0641\u0646\u06cc \u06cc\u0627\u062f\u06af\u06cc\u0631\u06cc \u0639\u0645\u06cc\u0642 \u06a9\u0647 \u0628\u0627\u06cc\u062f \u0628\u062f\u0627\u0646\u06cc\u062f<\/a><\/li><li><a href=\"https:\/\/shahaab-co.com\/mag\/edu\/ml\/xgboost-algorithm\/\">\u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 \u0627\u0644\u06af\u0648\u0631\u06cc\u062a\u0645 XGBoost \u062f\u0631 \u06cc\u0627\u062f\u06af\u06cc\u0631\u06cc \u0645\u0627\u0634\u06cc\u0646<\/a><\/li><li><a href=\"https:\/\/shahaab-co.com\/mag\/tech\/10-best-face-recognition-apps-for-android-in-2019\/\">\u06f1\u06f0 \u0628\u0631\u0646\u0627\u0645\u0647 \u0628\u0631\u062a\u0631 \u062a\u0634\u062e\u06cc\u0635 \u0686\u0647\u0631\u0647 \u0627\u0646\u062f\u0631\u0648\u06cc\u062f \u062f\u0631 \u0633\u0627\u0644 \u06f2\u06f0\u06f1\u06f9<\/a><\/li><li><a href=\"https:\/\/shahaab-co.com\/mag\/programming-tools\/tensorflow-20-is-now-available\/\">\u06a9\u062a\u0627\u0628\u062e\u0627\u0646\u0647 \u06cc TensorFlow 2.0 \u0627\u06a9\u0646\u0648\u0646 \u062f\u0631 \u062f\u0633\u062a\u0631\u0633 \u0627\u0633\u062a!<\/a><\/li><li><a href=\"https:\/\/shahaab-co.com\/mag\/tech\/top-10-ai-apps-2020\/\">\u06f1\u06f0 \u0627\u067e\u0644\u06cc\u06a9\u06cc\u0634\u0646 \u0628\u0631\u062a\u0631 \u0647\u0648\u0634 \u0645\u0635\u0646\u0648\u0639\u06cc \u062f\u0631 \u0633\u0627\u0644 \u06f2\u06f0\u06f2\u06f0<\/a><\/li><\/ul>\n\n\n\n<a href=\"#\" class=\"shortc-button small blue \">\u0645\u0646\u0628\u0639<\/a> <a href=\"https:\/\/medium.com\/bobble-engineering\/deploying-tenserflow-lite-model-on-android-de4ac3c187b2\" target=\"_blank\" class=\"shortc-button small gray \" rel=\"noopener\">Medium<\/a>\n<\/div><\/div>\n\n\n<div class=\"kk-star-ratings kksr-auto kksr-align-right kksr-valign-bottom\"\n    data-payload='{&quot;align&quot;:&quot;right&quot;,&quot;id&quot;:&quot;10035&quot;,&quot;slug&quot;:&quot;default&quot;,&quot;valign&quot;:&quot;bottom&quot;,&quot;ignore&quot;:&quot;&quot;,&quot;reference&quot;:&quot;auto&quot;,&quot;class&quot;:&quot;&quot;,&quot;count&quot;:&quot;0&quot;,&quot;legendonly&quot;:&quot;&quot;,&quot;readonly&quot;:&quot;&quot;,&quot;score&quot;:&quot;0&quot;,&quot;starsonly&quot;:&quot;&quot;,&quot;best&quot;:&quot;5&quot;,&quot;gap&quot;:&quot;5&quot;,&quot;greet&quot;:&quot;\u0627\u0645\u062a\u06cc\u0627\u0632 \u062f\u0647\u06cc\u062f!&quot;,&quot;legend&quot;:&quot;0\\\/5 - (0 \u0627\u0645\u062a\u06cc\u0627\u0632)&quot;,&quot;size&quot;:&quot;24&quot;,&quot;title&quot;:&quot;\u0631\u0627\u0647 \u0627\u0646\u062f\u0627\u0632\u06cc TensorFlow Lite \u0631\u0648\u06cc \u0627\u0646\u062f\u0631\u0648\u06cc\u062f&quot;,&quot;width&quot;:&quot;0&quot;,&quot;_legend&quot;:&quot;{score}\\\/{best} - ({count} \u0627\u0645\u062a\u06cc\u0627\u0632)&quot;,&quot;font_factor&quot;:&quot;1.25&quot;}'>\n            \n<div class=\"kksr-stars\">\n    \n<div class=\"kksr-stars-inactive\">\n            <div class=\"kksr-star\" data-star=\"1\" style=\"padding-left: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" data-star=\"2\" style=\"padding-left: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" data-star=\"3\" style=\"padding-left: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" data-star=\"4\" style=\"padding-left: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" data-star=\"5\" style=\"padding-left: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n    <\/div>\n    \n<div class=\"kksr-stars-active\" style=\"width: 0px;\">\n            <div class=\"kksr-star\" style=\"padding-left: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" style=\"padding-left: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" style=\"padding-left: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" style=\"padding-left: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" style=\"padding-left: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n    <\/div>\n<\/div>\n                \n\n<div class=\"kksr-legend\" style=\"font-size: 19.2px;\">\n            <span class=\"kksr-muted\">\u0627\u0645\u062a\u06cc\u0627\u0632 \u062f\u0647\u06cc\u062f!<\/span>\n    <\/div>\n    <\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u062f\u0631 \u0627\u06cc\u0646 \u0645\u0642\u0627\u0644\u0647\u060c \u0646\u062d\u0648\u0647 \u0628\u0627\u0631\u06af\u0630\u0627\u0631\u06cc \u0645\u062f\u0644 .tflite \u0631\u0648\u06cc \u0627\u067e\u0644\u06cc\u06a9\u06cc\u0634\u0646 \u0647\u0627\u06cc \u0627\u0646\u062f\u0631\u0648\u06cc\u062f \u0648 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 \u0622\u0646 \u0628\u0631\u0627\u06cc \u0627\u0646\u062c\u0627\u0645 \u067e\u06cc\u0634 \u0628\u06cc\u0646\u06cc \u0631\u0627 \u062e\u0648\u0627\u0647\u06cc\u062f \u0622\u0645\u0648\u062e\u062a. TensorFlow Lite \u0686\u06cc\u0633\u062a\u061f TensorFlow Lite \u06cc\u0627 .tflite \u06cc\u06a9 \u0646\u0633\u062e\u0647 \u0633\u0628\u06a9 \u0627\u0632 \u0641\u0631\u06cc\u0645 \u0648\u0631\u06a9 \u06cc\u0627\u062f\u06af\u06cc\u0631\u06cc \u0645\u0627\u0634\u06cc\u0646 \u0645\u0646\u0628\u0639 \u0628\u0627\u0632 \u06af\u0648\u06af\u0644 \u0627\u0633\u062a.\u00a0 \u0645\u062f\u0644 \u0647\u0627\u06cc .tflite \u0628\u0647 \u0637\u0648\u0631 \u0645\u062e\u0635\u0648\u0635 \u0628\u0631\u0627\u06cc \u062f\u0633\u062a\u06af\u0627\u0647 \u0647\u0627\u06cc \u0645\u0648\u0628\u0627\u06cc\u0644 \u06cc\u0627 \u0633\u06cc\u0633\u062a\u0645 \u0647\u0627\u06cc \u062a\u062c\u0645\u06cc\u0639 &hellip;<\/p>\n","protected":false},"author":7,"featured_media":10041,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_editorskit_title_hidden":false,"_editorskit_reading_time":0,"_editorskit_is_block_options_detached":false,"_editorskit_block_options_position":"{}","footnotes":""},"categories":[19,18],"tags":[227,225,160,228,84,82],"class_list":["post-10035","post","type-post","status-publish","format-standard","has-post-thumbnail","","category-deep-learning","category-edu","tag-c","tag-tensorflow","tag-160","tag-228","tag-84","tag-82"],"_links":{"self":[{"href":"https:\/\/shahaab-co.com\/mag\/wp-json\/wp\/v2\/posts\/10035","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/shahaab-co.com\/mag\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/shahaab-co.com\/mag\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/shahaab-co.com\/mag\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/shahaab-co.com\/mag\/wp-json\/wp\/v2\/comments?post=10035"}],"version-history":[{"count":0,"href":"https:\/\/shahaab-co.com\/mag\/wp-json\/wp\/v2\/posts\/10035\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/shahaab-co.com\/mag\/wp-json\/wp\/v2\/media\/10041"}],"wp:attachment":[{"href":"https:\/\/shahaab-co.com\/mag\/wp-json\/wp\/v2\/media?parent=10035"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/shahaab-co.com\/mag\/wp-json\/wp\/v2\/categories?post=10035"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/shahaab-co.com\/mag\/wp-json\/wp\/v2\/tags?post=10035"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}