مركز TensorFlow
تنظيم صفحاتك في مجموعات
يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
TensorFlow Hub عبارة عن مستودع مفتوح ومكتبة للتعلم الآلي القابل لإعادة الاستخدام. يوفر مستودع tfhub.dev العديد من النماذج المدربة مسبقًا: تضمينات النص ونماذج تصنيف الصور ونماذج TF.js/TFLite وغير ذلك الكثير. المستودع مفتوح للمساهمين من المجتمع .
تتيح لك مكتبة tensorflow_hub
تنزيلها وإعادة استخدامها في برنامج TensorFlow الخاص بك بأقل قدر من التعليمات البرمجية.
import tensorflow_hub as hub
model = hub.KerasLayer("https://tfhub.dev/google/nnlm-en-dim128/2")
embeddings = model(["The rain in Spain.", "falls",
"mainly", "In the plain!"])
print(embeddings.shape) #(4,128)
الخطوات التالية
إنّ محتوى هذه الصفحة مرخّص بموجب ترخيص Creative Commons Attribution 4.0 ما لم يُنصّ على خلاف ذلك، ونماذج الرموز مرخّصة بموجب ترخيص Apache 2.0. للاطّلاع على التفاصيل، يُرجى مراجعة سياسات موقع Google Developers. إنّ Java هي علامة تجارية مسجَّلة لشركة Oracle و/أو شركائها التابعين.
تاريخ التعديل الأخير: 2025-07-25 (حسب التوقيت العالمي المتفَّق عليه)
[null,null,["تاريخ التعديل الأخير: 2025-07-25 (حسب التوقيت العالمي المتفَّق عليه)"],[],[],null,["# TensorFlow Hub\n\n\u003cbr /\u003e\n\nTensorFlow Hub is an open repository and library for reusable machine learning.\nThe [tfhub.dev](https://tfhub.dev) repository provides many pre-trained models:\ntext embeddings, image classification models, TF.js/TFLite models and much more.\nThe repository is open to\n[community contributors](https://tfhub.dev/s?subtype=publisher).\n\nThe [`tensorflow_hub`](https://github.com/tensorflow/hub) library lets you\ndownload and reuse them in your TensorFlow program with a minimum amount of\ncode. \n\n import tensorflow_hub as hub\n\n model = hub.KerasLayer(\"https://tfhub.dev/google/nnlm-en-dim128/2\")\n embeddings = model([\"The rain in Spain.\", \"falls\",\n \"mainly\", \"In the plain!\"])\n\n print(embeddings.shape) #(4,128)\n\nNext Steps\n----------\n\n- [Find models on tfhub.dev](https://tfhub.dev)\n- [Publish models on tfhub.dev](/hub/publish)\n- TensorFlow Hub library\n - [Install TensorFlow Hub](/hub/installation)\n - [Library overview](/hub/lib_overview)\n- [Follow tutorials](/hub/tutorials)"]]