تنظيم صفحاتك في مجموعات
يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
توفر واجهات برمجة التطبيقات الأساسية TensorFlow مجموعة من واجهات برمجة التطبيقات ذات المستوى المنخفض الشاملة والقابلة للتكوين والموسعة للحسابات عالية الأداء (الموزعة والمعجلة) ، والتي تهدف في المقام الأول إلى بناء نماذج التعلم الآلي (ML) بالإضافة إلى تأليف أدوات وأطر عمل ML ضمن منصة TensorFlow. توفر واجهات برمجة التطبيقات هذه أساسًا لإنشاء نماذج قابلة للتكوين بدرجة عالية مع تحكم دقيق وأطر عمل جديدة من الألف إلى الياء.
يمكن استخدام واجهات برمجة التطبيقات الأساسية كبديل لواجهات برمجة تطبيقات التعلم الآلي عالية المستوى مثل Keras. تعد واجهات برمجة التطبيقات عالية المستوى هذه هي الأنسب لاحتياجات التعلم الآلي العامة. أنها توفر مجموعة متنوعة من الوحدات النمطية التي تجرد تعقيدات ML بينما تقدم أيضًا وظائف للتخصيص من خلال التصنيف الفرعي. إذا كنت تبحث عن نظرة عامة على TensorFlow باستخدام Keras ، فراجع أقسام Quickstarts و Keras في البرامج التعليمية .
من الذي يجب أن يستخدم واجهات برمجة التطبيقات الأساسية
تم تصميم واجهات برمجة التطبيقات منخفضة المستوى TensorFlow Core مع وضع مطوري ML التاليين في الاعتبار:
يقوم الباحثون ببناء نماذج معقدة ذات مستويات عالية من قابلية التكوين
المطورون المهتمون باستخدام TensorFlow كمنصة حوسبة علمية عالية الأداء
يقوم مؤلفو الإطار ببناء أدوات فوق منصة TensorFlow
يهتم مستخدمو API رفيعو المستوى بما يلي:
إضافة وظائف إضافية إلى مهام سير عمل التعلم الآلي الخاصة بهم مثل الطبقات المخصصة ، والخسائر ، والنماذج ، والمحسِّنون
تعلم المزيد عن الأعمال الداخلية لنماذجهم
تطبيقات API الأساسية
توفر واجهات برمجة تطبيقات TensorFlow Core الوصول إلى وظائف منخفضة المستوى داخل نظام TensorFlow البيئي. توفر واجهة برمجة التطبيقات هذه مزيدًا من المرونة والتحكم في إنشاء نماذج وتطبيقات وأدوات تعلّم الآلة ، مقارنةً بواجهات برمجة التطبيقات عالية المستوى ، مثل Keras.
بناء النماذج وسير العمل
تُستخدم واجهات برمجة التطبيقات (API) الأساسية بشكل شائع لبناء نماذج وسير عمل للتعلم الآلي قابلة للتخصيص والمحسّنة بشكل كبير. فيما يلي بعض الطرق التي يمكن بواجهة برمجة تطبيقات TensorFlow Core من خلالها تحسين نماذج التعلم الآلي وتطوير سير العمل:
بناء نماذج أو طبقات غير تقليدية لا تتناسب تمامًا مع الهياكل التي تدعمها واجهات برمجة التطبيقات عالية المستوى
بناء طبقات وخسائر ونماذج ومحسنات مخصصة داخل Keras
تطبيق تقنيات تحسين جديدة لتسريع التقارب أثناء التدريب
إنشاء مقاييس مخصصة لتقييم الأداء
تصميم حلقات تدريب قابلة للتكوين بدرجة عالية مع دعم ميزات مثل إستراتيجيات التجميع والتحقق المتبادل والتوزيع
بناء الأطر والأدوات
يمكن أيضًا أن تكون واجهات برمجة التطبيقات TensorFlow Core بمثابة اللبنات الأساسية لأطر العمل الجديدة عالية المستوى. فيما يلي بعض الأمثلة على الأدوات والأطر التي تم إنشاؤها باستخدام واجهات برمجة التطبيقات منخفضة المستوى:
توفر وثائق Build with Core دروسًا تعليمية لمفاهيم تعلم الآلة الأساسية من البداية. تساعدك البرامج التعليمية في هذا القسم على الشعور بالراحة عند كتابة التعليمات البرمجية ذات المستوى المنخفض باستخدام واجهات برمجة التطبيقات الأساسية التي يمكنك تطبيقها بعد ذلك على حالات الاستخدام الأكثر تعقيدًا الخاصة بك.
تاريخ التعديل الأخير: 2023-05-19 (حسب التوقيت العالمي المتفَّق عليه)
[null,null,["تاريخ التعديل الأخير: 2023-05-19 (حسب التوقيت العالمي المتفَّق عليه)"],[],[],null,["# TensorFlow Core APIs overview\n\n\u003cbr /\u003e\n\nThe TensorFlow Core APIs provide a set of comprehensive, composable, and\nextensible low-level APIs for high-performance (distributed and accelerated)\ncomputation, primarily aimed at building machine learning (ML) models as well as\nauthoring ML workflow tools and frameworks within the TensorFlow platform. These\nAPIs provide a foundation for creating highly configurable models with\nfine-grained control and new frameworks from the ground up.\n\nThe Core APIs can be used as an alternative to high-level machine learning APIs\nlike Keras. These high-level APIs are best suited for general machine learning\nneeds. They offer a variety of modules that abstract away the complexities of ML\nwhile also offering functionalities for customization through subclassing. If\nyou are looking for an overview of TensorFlow using Keras, see the Quickstarts\nand Keras sections in the [tutorials](https://www.tensorflow.org/tutorials).\n\nWho should use the Core APIs\n----------------------------\n\nThe TensorFlow Core low-level APIs are designed with the following ML developers\nin mind:\n\n- Researchers building complex models with high levels of configurability\n- Developers interested in using TensorFlow as a high-performance scientific computing platform\n- Framework authors building tools on top of the TensorFlow platform\n- High-level API users interested in:\n - Adding additional functionalities to their machine learning workflows such as custom layers, losses, models, and optimizers\n - Learning more about the inner workings of their models\n\nCore API applications\n---------------------\n\nThe TensorFlow Core APIs provide access to low level functionality within the\nTensorFlow ecosystem. This API provides more flexibility and control for\nbuilding ML models, applications, and tools, compared to high-level APIs, such\nas Keras.\n\n### Build models and workflows\n\nThe Core APIs are most commonly used to build highly customizable and optimized\nmachine learning models and workflows. Here are some of the ways that the\nTensorFlow Core APIs can improve your machine learning models and workflow\ndevelopment:\n\n- Building non-traditional models or layers that do not fully fit the structures supported by high-level APIs\n- Building custom layers, losses, models, and optimizers within Keras\n- Implementing new optimization techniques to expedite convergence during training\n- Creating custom metrics for performance evaluation\n- Designing highly-configurable training loops with support for features like batching, cross-validation, and distribution strategies\n\n### Build frameworks and tools\n\nThe TensorFlow Core APIs can also serve as the building blocks for new\nhigh-level frameworks. Here are some examples of tools and frameworks that are\ncreated with the low-level APIs:\n\n- [Keras](https://keras.io): deep learning for humans\n- [TensorFlow Model Optimization Toolkit](https://www.tensorflow.org/model_optimization): a suite of tools to optimize ML models for deployment and execution\n- [TensorFlow Graphics](https://www.tensorflow.org/graphics): a library for making useful graphics functions widely accessible\n\n### Build for scientific computing\n\nThe TensorFlow Core APIs can also be applied outside the realm of machine\nlearning. Here are a few general-purpose use cases of TensorFlow for scientific\ncomputing:\n\n- Physics simulations for solid mechanics and [fluid dynamics](https://arxiv.org/abs/2108.11076) problems\n- Graphics rendering applications like [ray tracing](https://github.com/BachiLi/redner)\n- Solving [constrained optimization problems](https://github.com/google-research/tensorflow_constrained_optimization/blob/master/README.md)\n\nCore API components\n-------------------\n\nHere are some of the fundamental components that comprise TensorFlow Core's low-\nlevel APIs. Note that this is not an all-encompassing list:\n\n- Data structures : [`tf.Tensor`](https://www.tensorflow.org/api_docs/python/tf/Tensor), [`tf.Variable`](https://www.tensorflow.org/api_docs/python/tf/Variable), [`tf.TensorArray`](https://www.tensorflow.org/api_docs/python/tf/TensorArray)\n- Primitive APIs: [`tf.shape`](https://www.tensorflow.org/api_docs/python/tf/shape), [slicing](https://www.tensorflow.org/guide/tensor_slicing), [`tf.concat`](https://www.tensorflow.org/api_docs/python/tf/concat), [`tf.bitwise`](https://www.tensorflow.org/api_docs/python/tf/bitwise)\n- Numerical: [`tf.math`](https://www.tensorflow.org/api_docs/python/tf/math), [`tf.linalg`](https://www.tensorflow.org/api_docs/python/tf/linalg), [`tf.random`](https://www.tensorflow.org/api_docs/python/tf/random)\n- Functional components: [`tf.function`](https://www.tensorflow.org/api_docs/python/tf/function), [`tf.GradientTape`](https://www.tensorflow.org/api_docs/python/tf/GradientTape)\n- Distribution: [DTensor](https://www.tensorflow.org/guide/dtensor_overview)\n- Export: [`tf.saved_model`](https://www.tensorflow.org/api_docs/python/tf/saved_model)\n\nNext steps\n----------\n\nThe *Build with Core* documentation provides tutorials of basic machine learning\nconcepts from scratch. The tutorials in this section help you get comfortable\nwith writing low-level code with Core APIs that you can then apply to more\ncomplex use cases of your own.\n| **Note:** You should not use the Core APIs to simply re-implement high-level APIs, and it is possible to use high-level APIs, such as Keras, with the Core APIs.\n\nTo get started using and learning more about the Core APIs, check out the\n[Quickstart for TensorFlow Core](https://www.tensorflow.org/guide/core/quickstart_core)."]]