|
| 1 | +# This file is rendered on tensorflow.org/hub. |
| 2 | +# ../README.md is rendered on github.com/tensorflow/hub. |
| 3 | +# Both link to ./overview.md and ./*.md for detailed docs. |
| 4 | +book_path: /hub/_book.yaml |
| 5 | +project_path: /hub/_project.yaml |
| 6 | +description: > |
| 7 | + TensorFlow Hub is a repository of trained machine learning models ready for fine-tuning and |
| 8 | + deployable anywhere. Reuse trained models like BERT and Faster R-CNN with just a few lines of code. |
| 9 | +landing_page: |
| 10 | + custom_css_path: /site-assets/css/style.css |
| 11 | + rows: |
| 12 | + - heading: TensorFlow Hub is a repository of trained machine learning models. |
| 13 | + items: |
| 14 | + - classname: |
| 15 | + tfo-landing-row-item-code-block |
| 16 | + devsite-landing-row-50 |
| 17 | + description: > |
| 18 | + TensorFlow Hub is a repository of trained machine learning models ready for fine-tuning and |
| 19 | + deployable anywhere. Reuse trained models like BERT and Faster R-CNN with just a few lines of code. |
| 20 | + list: |
| 21 | + - heading: See the guide |
| 22 | + description: Learn about how to use TensorFlow Hub and how it works. |
| 23 | + path: /hub/overview |
| 24 | + icon: |
| 25 | + path: /hub/images/guide_basics.png |
| 26 | + - heading: See tutorials |
| 27 | + description: Tutorials show you end-to-end examples using TensorFlow Hub. |
| 28 | + path: /hub/tutorials |
| 29 | + icon: |
| 30 | + path: /site-assets/images/marketing/learn/lite-pick.svg |
| 31 | + - heading: See models |
| 32 | + description: Find trained TF, TFLite, and TF.js models for your use case. |
| 33 | + path: https://tfhub.dev |
| 34 | + icon: |
| 35 | + path: /site-assets/images/marketing/learn/js-run.svg |
| 36 | + code_block: | |
| 37 | + <pre class = "prettyprint"> |
| 38 | + !pip install --upgrade tensorflow_hub |
| 39 | +
|
| 40 | + import tensorflow_hub as hub |
| 41 | +
|
| 42 | + model = hub.KerasLayer("https://tfhub.dev/google/nnlm-en-dim128/2") |
| 43 | + embeddings = model(["The rain in Spain.", "falls", |
| 44 | + "mainly", "In the plain!"]) |
| 45 | +
|
| 46 | + print(embeddings.shape) #(4,128) |
| 47 | + </pre> |
| 48 | + - options: |
| 49 | + - cards |
| 50 | + - centered-header |
| 51 | + heading: > |
| 52 | + <hr><br>Models |
| 53 | + description: > |
| 54 | + Find trained models from the TensorFlow community on <a href="https://tfhub.dev">TFHub.dev</a> |
| 55 | + items: |
| 56 | + - heading: BERT |
| 57 | + description: Check out BERT for NLP tasks including text classification and question answering. |
| 58 | + path: https://tfhub.dev/tensorflow/bert_en_uncased_L-12_H-768_A-12/3 |
| 59 | + image_path: /hub/images/bert.png |
| 60 | + buttons: |
| 61 | + - label: See the model<span class="material-icons icon-after" aria-hidden="true">north_east</span> |
| 62 | + path: https://tfhub.dev/tensorflow/bert_en_uncased_L-12_H-768_A-12/3 |
| 63 | + - heading: Object detection |
| 64 | + description: Use the Faster R-CNN Inception ResNet V2 640x640 model for detecting objects in images. |
| 65 | + path: https://tfhub.dev/tensorflow/faster_rcnn/inception_resnet_v2_640x640/1 |
| 66 | + image_path: /hub/images/object_detection.png |
| 67 | + buttons: |
| 68 | + - label: See the model<span class="material-icons icon-after" aria-hidden="true">north_east</span> |
| 69 | + path: https://tfhub.dev/tensorflow/faster_rcnn/inception_resnet_v2_640x640/1 |
| 70 | + - heading: Style transfer |
| 71 | + description: Transfer the style of one image to another using the image style transfer model. |
| 72 | + path: https://tfhub.dev/google/magenta/arbitrary-image-stylization-v1-256/2 |
| 73 | + image_path: /hub/images/style_transfer.png |
| 74 | + buttons: |
| 75 | + - label: See the model<span class="material-icons icon-after" aria-hidden="true">north_east</span> |
| 76 | + path: https://tfhub.dev/google/magenta/arbitrary-image-stylization-v1-256/2 |
| 77 | + - heading: On-device food classifier |
| 78 | + description: Use this TFLite model to classify photos of food on a mobile device. |
| 79 | + path: https://tfhub.dev/google/lite-model/aiy/vision/classifier/food_V1/1 |
| 80 | + image_path: /hub/images/food.png |
| 81 | + buttons: |
| 82 | + - label: See the model<span class="material-icons icon-after" aria-hidden="true">north_east</span> |
| 83 | + path: https://tfhub.dev/google/lite-model/aiy/vision/classifier/food_V1/1 |
| 84 | + - options: |
| 85 | + - cards |
| 86 | + - centered-header |
| 87 | + heading: > |
| 88 | + <hr><br>News & announcements |
| 89 | + description: > |
| 90 | + Check out <a href="https://blog.tensorflow.org/search?label=TensorFlow+Hub">our blog</a> for more announcements and view the latest <a href="https://twitter.com/search?q=%23TFHub%20from%3ATensorFlow&src=typed_query&f=live">#TFHub updates</a> on Twitter |
| 91 | + items: |
| 92 | + - heading: TensorFlow Hub for Real World Impact at Google I/O |
| 93 | + youtube_id: BE5nkhFe3AE |
| 94 | + description: > |
| 95 | + Learn how you can use TensorFlow Hub to build ML solutions with real world impact. |
| 96 | + buttons: |
| 97 | + - label: Watch the video<span class="material-icons icon-after" aria-hidden="true">north_east</span> |
| 98 | + path: https://www.youtube.com/watch?v=BE5nkhFe3AE |
| 99 | + - heading: "On-device ML solutions" |
| 100 | + description: > |
| 101 | + To explore ML solutions for your mobile and web apps including TensorFlow Hub, visit the Google on-device machine learning page. |
| 102 | + path: https://g.co/on-device-ml |
| 103 | + image_path: /hub/images/odml.png |
| 104 | + buttons: |
| 105 | + - label: Visit the site<span class="material-icons icon-after" aria-hidden="true">north_east</span> |
| 106 | + path: https://g.co/on-device-ml |
| 107 | + - heading: "Making BERT Easier with Preprocessing Models From TensorFlow Hub" |
| 108 | + description: > |
| 109 | + TensorFlow Hub makes BERT simple to use with new preprocessing models. |
| 110 | + path: https://blog.tensorflow.org/2020/12/making-bert-easier-with-preprocessing-models-from-tensorflow-hub.html |
| 111 | + image_path: /hub/images/bert_preprocess_wide.png |
| 112 | + buttons: |
| 113 | + - label: Read the blog<span class="material-icons icon-after" aria-hidden="true">arrow_forward</span> |
| 114 | + path: https://blog.tensorflow.org/2020/12/making-bert-easier-with-preprocessing-models-from-tensorflow-hub.html |
| 115 | + - heading: "From singing to musical scores: Estimating pitch with SPICE and Tensorflow Hub" |
| 116 | + description: > |
| 117 | + Learn how to use the SPICE model to automatically transcribe sheet music from live audio. |
| 118 | + path: https://blog.tensorflow.org/2020/06/estimating-pitch-with-spice-and-tensorflow-hub.html |
| 119 | + image_path: /hub/images/spice_blog.png |
| 120 | + buttons: |
| 121 | + - label: Read the blog<span class="material-icons icon-after" aria-hidden="true">arrow_forward</span> |
| 122 | + path: https://blog.tensorflow.org/2020/06/estimating-pitch-with-spice-and-tensorflow-hub.html |
| 123 | + - options: |
| 124 | + - cards |
| 125 | + - centered-header |
| 126 | + heading: > |
| 127 | + <hr><br>Community |
| 128 | + description: Join the TensorFlow Hub community |
| 129 | + items: |
| 130 | + - heading: <span style="font-size:20px;">Ask a question on Stack Overflow</span> |
| 131 | + icon: |
| 132 | + path: /hub/images/stackoverflow_icon.svg |
| 133 | + path: https://stackoverflow.com/questions/tagged/tensorflow-hub |
| 134 | + - heading: <span style="font-size:20px;">TensorFlow Hub on GitHub</span> |
| 135 | + icon: |
| 136 | + path: /hub/images/github_icon.svg |
| 137 | + path: https://github.com/tensorflow/hub |
| 138 | + - heading: <span style="font-size:20px;">Contribute models</span> |
| 139 | + icon: |
| 140 | + name: publish |
| 141 | + path: /hub/publish |
| 142 | + - heading: <span style="font-size:20px;">Community discussion forum</span> |
| 143 | + icon: |
| 144 | + name: people |
| 145 | + path: https://groups.google.com/a/tensorflow.org/forum/#!forum/hub |
| 146 | + - options: |
| 147 | + - cta |
| 148 | + items: |
| 149 | + - heading: Get started with TensorFlow Hub |
| 150 | + buttons: |
| 151 | + - label: Find trained models <span class="material-icons icon-after" aria-hidden="true">north_east</span> |
| 152 | + path: https://tfhub.dev |
| 153 | + classname: button |
0 commit comments