คำแนะนำในการย้ายข้อมูล NNAPI
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
เลิกใช้งาน Neural Networks API (NNAPI) แล้ว เราได้เปิดตัวฟีเจอร์นี้ใน Android 8.1 เพื่อมอบอินเทอร์เฟซแบบรวมสำหรับการอนุมานที่เร่งด้วยฮาร์ดแวร์สำหรับแมชชีนเลิร์นนิงบนอุปกรณ์ และเลิกใช้งานใน Android 15
หลังจากการเปิดตัว NNAPI ภาคแมชชีนเลิร์นนิงในอุปกรณ์ (ODML) พัฒนาไปอย่างรวดเร็ว การพัฒนาที่สำคัญ เช่น โมเดลทรานฟอร์เมอร์และโมเดลการแพร่กระจาย ประกอบกับอัตรานวัตกรรมที่สูงในสาขานี้ทำให้นักพัฒนาซอฟต์แวร์ต้องใช้เครื่องมือและโครงสร้างพื้นฐานที่อัปเดตบ่อยครั้ง
Google จึงได้พัฒนา TensorFlow Lite ในบริการ Google Play ซึ่งให้บริการรันไทม์ TensorFlow ที่อัปเดตได้สำหรับโมเดล ML ในอุปกรณ์ที่กําหนดเอง และ AICore ซึ่งให้บริการโมเดลพื้นฐาน GenAI เช่น Gemini Nano ในอุปกรณ์ Android โดยตรง เราเลิกใช้งาน NNAPI (Neural Networks API) เพื่อให้เกิดความชัดเจนมากขึ้นเกี่ยวกับเส้นทางที่แนะนำสำหรับ ML เวอร์ชันที่ใช้งานจริงบน Android
หากต้องการย้ายข้อมูลจาก NNAPI โปรดดูวิธีการสำหรับ TensorFlow Lite ในบริการ Google Play และตัวแทน GPU ของ TFLite (ไม่บังคับ) สำหรับการเร่งด้วยฮาร์ดแวร์
ตัวอย่างเนื้อหาและโค้ดในหน้าเว็บนี้ขึ้นอยู่กับใบอนุญาตที่อธิบายไว้ในใบอนุญาตการใช้เนื้อหา Java และ OpenJDK เป็นเครื่องหมายการค้าหรือเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-04-07 UTC
[[["เข้าใจง่าย","easyToUnderstand","thumb-up"],["แก้ปัญหาของฉันได้","solvedMyProblem","thumb-up"],["อื่นๆ","otherUp","thumb-up"]],[["ไม่มีข้อมูลที่ฉันต้องการ","missingTheInformationINeed","thumb-down"],["ซับซ้อนเกินไป/มีหลายขั้นตอนมากเกินไป","tooComplicatedTooManySteps","thumb-down"],["ล้าสมัย","outOfDate","thumb-down"],["ปัญหาเกี่ยวกับการแปล","translationIssue","thumb-down"],["ตัวอย่าง/ปัญหาเกี่ยวกับโค้ด","samplesCodeIssue","thumb-down"],["อื่นๆ","otherDown","thumb-down"]],["อัปเดตล่าสุด 2025-04-07 UTC"],[],[],null,["# NNAPI Migration Guide\n\nThe Neural Networks API (NNAPI) is deprecated. It was\n[introduced in Android 8.1](/about/versions/oreo/android-8.1#nnapi) to provide a unified interface for hardware\naccelerated inference for on-device machine learning,\nand deprecated in Android 15.\n\nAfter NNAPI's release, the field of on-device machine learning (ODML)\nadvanced rapidly. Breakthroughs such as transformer and diffusion models,\nalong with the high rate of innovation in the field meant that\ndevelopers needed tools and infrastructure that update frequently.\n\nTo meet those needs, Google developed\n[TensorFlow Lite in Play Services](https://www.tensorflow.org/lite/android/play_services),\nproviding an updatable TensorFlow runtime for custom on-device ML models,\nand [AICore](/ml/aicore), which provide GenAI foundation models like\nGemini Nano directly on Android devices. To provide greater clarity on\nthe recommended paths for production ML on Android, NNAPI (Neural Networks API)\nwas deprecated.\n\nTo migrate from NNAPI, see the instructions for\n[TensorFlow Lite in Google Play Services](https://www.tensorflow.org/lite/android/play_services)\nand optionally [TFLite GPU delegate](https://www.tensorflow.org/lite/android/delegates/gpu) for hardware acceleration."]]