-
Notifications
You must be signed in to change notification settings - Fork 281
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial tensorflow io web page setup
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
- Loading branch information
Showing
2 changed files
with
98 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
# Copyright 2019 The TensorFlow Authors. All Rights Reserved. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
# ============================================================================== | ||
project_path: /io/_project.yaml | ||
description: <!--no description--> | ||
landing_page: | ||
custom_css_path: /site-assets/css/style.css | ||
rows: | ||
- heading: TensorFlow I/O provides useful extra Dataset, streaming, and file system extensions maintained by TensorFlow SIG-IO | ||
items: | ||
- classname: devsite-landing-row-50 | ||
description: > | ||
TensorFlow I/O is a collection of file systems and file formats | ||
that are not available in TensorFlow's built-in support. | ||
code_block: | | ||
<pre class = "prettyprint"> | ||
import tensorflow as tf | ||
import tensorflow_io.mnist as mnist_io | ||
# Read MNIST into tf.data.Dataset | ||
d_train = mnist_io.MNISTDataset( | ||
'train-images-idx3-ubyte.gz', | ||
'train-labels-idx1-ubyte.gz', | ||
batch=1) | ||
# By default image data is uint8 so conver to float32. | ||
d_train = d_train.map(lambda x, y: (tf.image.convert_image_dtype(x, tf.float32), y)) | ||
model = tf.keras.models.Sequential([ | ||
tf.keras.layers.Flatten(input_shape=(28, 28)), | ||
tf.keras.layers.Dense(512, activation=tf.nn.relu), | ||
tf.keras.layers.Dropout(0.2), | ||
tf.keras.layers.Dense(10, activation=tf.nn.softmax) | ||
]) | ||
model.compile(optimizer='adam', | ||
loss='sparse_categorical_crossentropy', | ||
metrics=['accuracy']) | ||
model.fit(d_train, epochs=5, steps_per_epoch=10000) | ||
</pre> | ||
{% dynamic if request.tld != 'cn' %} | ||
{% dynamic endif %} | ||
- classname: devsite-landing-row-cards | ||
items: | ||
- heading: "Introducing TensorFlow I/O" | ||
image_path: /resources/images/tf-logo-card-16x9.png | ||
path: https://medium.com/tensorflow/introducing-tensorflow-addons-6131a50a3dcf | ||
buttons: | ||
- label: "TensorFlow with Apache Arrow Datasets" | ||
path: https://medium.com/tensorflow/tensorflow-with-apache-arrow-datasets-cdbcfe80a59f | ||
- label: "How to build a custom Dataset for Tensorflow" | ||
path: https://towardsdatascience.com/how-to-build-a-custom-dataset-for-tensorflow-1fe3967544d8 | ||
- label: "TensorFlow on Apache Ignite" | ||
path: https://medium.com/tensorflow/tensorflow-on-apache-ignite-99f1fc60efeb | ||
- heading: "TensorFlow I/O on GitHub" | ||
image_path: /resources/images/github-card-16x9.png | ||
path: https://github.com/tensorflow/io | ||
buttons: | ||
- label: "View on GitHub" | ||
path: https://github.com/tensorflow/io |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Copyright 2019 The TensorFlow Authors. All Rights Reserved. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
# ============================================================================== | ||
name: TensorFlow I/O | ||
breadcrumb_name: I/O | ||
home_url: /io/ | ||
parent_project_metadata_path: /_project.yaml | ||
description: > | ||
"TensorFlow I/O provides useful extra Dataset, streaming, and file system extensions maintained by TensorFlow SIG-IO" | ||
use_site_branding: true | ||
hide_from_products_list: true | ||
content_license: cc-apache | ||
include: /_project_included.yaml |