ฮับ 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)
ขั้นตอนต่อไป
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-07-25 UTC
[null,null,["อัปเดตล่าสุด 2025-07-25 UTC"],[],[],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)"]]