forked from tensorflow/hub
-
Notifications
You must be signed in to change notification settings - Fork 0
/
_index.yaml
69 lines (65 loc) · 2.77 KB
/
_index.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
book_path: /hub/_book.yaml
project_path: /hub/_project.yaml
description: <!--no description-->
landing_page:
custom_css_path: /site-assets/css/style.css
rows:
- heading: >
TensorFlow Hub is a library for reusable machine learning modules.
items:
- classname:
tfo-landing-row-item-code-block
devsite-landing-row-50
description: >
TensorFlow Hub is a library for the publication, discovery, and
consumption of reusable parts of machine learning models. A
<em>module</em> is a self-contained piece of a TensorFlow graph, along
with its weights and assets, that can be reused across different tasks in
a process known as transfer learning. Transfer learning can:
<ul style="padding-left: 20px;">
<li>Train a model with a smaller dataset,</li>
<li>Improve generalization, and</li>
<li>Speed up training.</li>
</ul>
<div class="devsite-landing-row-item-buttons">
<a class="button button-primary tfo-button-primary" href="https://tfhub.dev">Browse modules on tfhub.dev</a>
</div>
code_block: |
<pre class = "prettyprint">
import tensorflow as tf
import tensorflow_hub as hub
with tf.Graph().as_default():
module_url = "https://tfhub.dev/google/nnlm-en-dim128-with-normalization/1"
embed = hub.Module(module_url)
embeddings = embed(["A long sentence.", "single-word",
"http://example.com"])
with tf.Session() as sess:
sess.run(tf.global_variables_initializer())
sess.run(tf.tables_initializer())
print(sess.run(embeddings))
</pre>
- classname: devsite-landing-row-cards
items:
- heading: tfhub.dev
image_path: /resources/images/hub-card-16x9.png
path: https://tfhub.dev
buttons:
- label: Browse modules
path: https://tfhub.dev
- heading: Introducing TensorFlow Hub
image_path: /resources/images/tf-logo-card-16x9.png
path: https://medium.com/tensorflow/introducing-tensorflow-hub-a-library-for-reusable-machine-learning-modules-in-tensorflow-cdee41fa18f9
buttons:
- label: Read on TensorFlow blog
path: https://medium.com/tensorflow/introducing-tensorflow-hub-a-library-for-reusable-machine-learning-modules-in-tensorflow-cdee41fa18f9
- heading: TensorFlow Hub at the Dev Summit
youtube_id: rirzJ-e68cw
buttons:
- label: Watch the video
path: https://www.youtube.com/watch?v=rirzJ-e68cw
- heading: TensorFlow Hub on GitHub
image_path: /resources/images/github-card-16x9.png
path: https://github.com/tensorflow/hub
buttons:
- label: View on GitHub
path: https://github.com/tensorflow/hub