Skip to content

Commit bd72635

Browse files
MarkDaoustcopybara-github
authored andcommitted
Move tensorflow hub doc's to the tensrflow/docs repo.
PiperOrigin-RevId: 553591294
1 parent e753dbc commit bd72635

File tree

99 files changed

+28585
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

99 files changed

+28585
-0
lines changed

CODEOWNERS

+3
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,6 @@
99

1010
# Community
1111
/site/en/community/ @ewilderj @theadactyl @joanafilipa
12+
13+
# Hub
14+
/site/en/hub @gustheman

LICENSE

+25
Original file line numberDiff line numberDiff line change
@@ -201,3 +201,28 @@ Copyright 2018 The TensorFlow Authors. All rights reserved.
201201
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
202202
See the License for the specific language governing permissions and
203203
limitations under the License.
204+
205+
206+
---------------------------
207+
208+
Where indicated, some files are also distributed under the MIT License:
209+
210+
MIT License
211+
212+
Permission is hereby granted, free of charge, to any person obtaining a
213+
copy of this software and associated documentation files (the "Software"),
214+
to deal in the Software without restriction, including without limitation
215+
the rights to use, copy, modify, merge, publish, distribute, sublicense,
216+
and/or sell copies of the Software, and to permit persons to whom the
217+
Software is furnished to do so, subject to the following conditions:
218+
219+
The above copyright notice and this permission notice shall be included in
220+
all copies or substantial portions of the Software.
221+
222+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
223+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
224+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
225+
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
226+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
227+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
228+
DEALINGS IN THE SOFTWARE.

site/en/hub/_book.yaml

+94
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
upper_tabs:
2+
# Tabs left of dropdown menu
3+
- include: /_upper_tabs_left.yaml
4+
- include: /api_docs/_upper_tabs_api.yaml
5+
# Dropdown menu
6+
- name: Resources
7+
path: /resources
8+
is_default: true
9+
menu:
10+
- include: /resources/_menu_toc.yaml
11+
lower_tabs:
12+
# Subsite tabs
13+
other:
14+
# [Guide]
15+
- name: "Guide"
16+
contents:
17+
# TF Hub Platform overview.
18+
- heading: Getting Started
19+
- title: Overview
20+
path: /hub/overview
21+
- title: Installation
22+
path: /hub/installation
23+
- title: Community and support
24+
path: /hub/community
25+
# Python library usage information
26+
- heading: Using the library
27+
- title: Overview
28+
path: /hub/lib_overview
29+
- title: SavedModels for TensorFlow 2
30+
path: /hub/tf2_saved_model
31+
- title: Caching model downloads
32+
path: /hub/caching
33+
- title: Migration to TF2
34+
path: /hub/migration_tf2
35+
- title: Model compatibility for TF1/TF2
36+
path: /hub/model_compatibility
37+
- title: "Deprecated: TF1 Hub format"
38+
path: /hub/tf1_hub_module
39+
status: deprecated
40+
# SavedModel APIs
41+
- heading: Common SavedModel APIs
42+
- title: Overview
43+
path: /hub/common_saved_model_apis/index.md
44+
- title: Reusable SavedModels (for all tasks)
45+
path: /hub/reusable_saved_models
46+
- title: Image tasks
47+
path: /hub/common_saved_model_apis/images
48+
- title: Text tasks
49+
path: /hub/common_saved_model_apis/text
50+
# Publishing models to TF-Hub
51+
- heading: Publishing models to TF-Hub
52+
- title: Publishing process
53+
path: /hub/publish
54+
- title: Export a model
55+
path: /hub/exporting_tf2_saved_model
56+
- title: Write documentation
57+
path: /hub/writing_documentation
58+
- title: Submit a pull request
59+
path: /hub/contribute_a_model
60+
- title: Data portability and deletion
61+
path: /hub/portability_and_deletion
62+
- title: "Deprecated: TF1 Hub format export"
63+
path: /hub/exporting_hub_format
64+
status: deprecated
65+
# Advanced developer info
66+
- heading: Advanced developer info
67+
- title: Model formats
68+
path: /hub/model_formats
69+
- title: Model hosting protocol
70+
path: /hub/hosting
71+
- title: Build from source
72+
path: /hub/build_from_source
73+
- title: Common issues
74+
path: /hub/common_issues
75+
- title: Contribute to TensorFlow Hub
76+
path: /hub/contribute
77+
# [Tutorials]
78+
- name: Tutorials
79+
path: /hub/tutorials
80+
contents:
81+
- include: /hub/tutorials/_toc.yaml
82+
# [API]
83+
- name: API
84+
skip_translation: true
85+
contents:
86+
- include: /hub/api_docs/python/hub/_toc.yaml
87+
# [Models]
88+
- name: "Models ↗"
89+
contents:
90+
- title: Models
91+
path: https://tfhub.dev
92+
status: external
93+
94+
- include: /_upper_tabs_right.yaml

site/en/hub/_index.yaml

+153
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,153 @@
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

site/en/hub/_redirects.yaml

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
redirects:
2+
- from: /hub/becoming_a_publisher
3+
to: /hub/publish
4+
- from: /hub/writing_model_documentation
5+
to: /hub/writing_documentation#model
6+
- from: /hub/creating_a_collection
7+
to: /hub/writing_documentation#collection

0 commit comments

Comments
 (0)