- Create the Overview page for TF Privacy

PiperOrigin-RevId: 373871593
This commit is contained in:
A. Unique TensorFlower 2021-05-14 14:54:20 -07:00
parent 452873e9ce
commit aaf4c252a0

View file

@ -1,50 +1,88 @@
# TODO(b/181782485): Switch to the main book for launch - /responsible_ai/_book.yaml # TODO(b/181782485): Switch to the main book for launch - /responsible_ai/_book.yaml
book_path: /responsible_ai/privacy/_book.yaml book_path: /responsible_ai/privacy/_book.yaml
project_path: /responsible_ai/_project.yaml project_path: /responsible_ai/_project.yaml
title: TensorFlow Privacy
description: > description: >
Page description used for search and social. Overview of TensorFlow Privacy library.
landing_page: landing_page:
nav: left nav: left
custom_css_path: /site-assets/css/style.css custom_css_path: /site-assets/css/style.css
rows: rows:
- heading: TensorFlow Privacy does something great. - heading: Privacy in Machine Learning
items: items:
- classname: devsite-landing-row-50 - classname: devsite-landing-row-50
description: > description: >
This is a description of PROJECT_NAME. Lorem ipsum dolor sit amet, <p>
consectetur adipiscing elit, sed do eiusmod tempor incididunt ut Preventing ML models from exposing potentially sensitive information is a critical part of
labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud using AI responsibly. To that end, <i>differentially private stochastic gradient descent
exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. (DP-SGD)</i> is a modification to the standard stochastic gradient descent (SGD) algorithm
in machine learning. </p>
<p>Models trained with DP-SGD have provable differential privacy (DP)
guarantees, mitigating the risk of exposing sensitive training data. Intuitively, a model
trained with differential privacy should not be affected by any single training example in
its data set. DP-SGD techniques can also be used in federated learning to provide user-level
differential privacy. You can learn more about differentially private deep learning in <a
href="https://arxiv.org/pdf/1607.00133.pdf">the original paper</a>.
</p>
code_block: | - code_block: |
<pre class = "prettyprint"> <pre class = "prettyprint">
import tensorflow as tf import tensorflow as tf
import PROJECT_NAME from tensorflow_privacy.privacy.optimizers import dp_optimizer_keras
# This is a short code snippet that shows off your project. # Select your differentially private optimizer
# Launch a Colab notebook to run this example. optimizer = tensorflow_privacy.DPKerasSGDOptimizer(
print("Hello, PROJECT_NAME") l2_norm_clip=l2_norm_clip,
</pre> noise_multiplier=noise_multiplier,
{% dynamic if request.tld != 'cn' %} num_microbatches=num_microbatches,
<a class="colab-button" target="_blank" href="https://colab.research.google.com/github/tensorflow/docs/blob/master/site/en/tutorials/_index.ipynb">Run in a <span>Notebook</span></a> learning_rate=learning_rate)
{% dynamic endif %}
# Select your loss function
loss = tf.keras.losses.CategoricalCrossentropy(
from_logits=True, reduction=tf.losses.Reduction.NONE)
# Compile your model
model.compile(optimizer=optimizer, loss=loss, metrics=['accuracy'])
# Fit your model
model.fit(train_data, train_labels,
epochs=epochs,
validation_data=(test_data, test_labels),
batch_size=batch_size)
</pre>
- classname: devsite-landing-row-100
- heading: TensorFlow Privacy
options:
- description-100
items:
- classname: devsite-landing-row-100
description: >
<p>Tensorflow Privacy (TF Privacy) is an open source library developed by teams in Google
Research. The library includes implementations of commonly used TensorFlow Optimizers for
training ML models with DP. The goal is to enable ML practitioners using standard Tensorflow
APIs to train privacy-preserving models by changing only a few lines of code.</p>
<p> The differentially private Optimizers can be used in conjunction with high-level APIs
that use the Optimizer class, especially Keras. Additionally, you can find differentially
private implementations of some Keras models. All of the Optimizers and models can be found
in the <a href="./privacy/api">API Documentation</a>.</p>
- classname: devsite-landing-row-cards - classname: devsite-landing-row-cards
items: items:
- heading: "Introducing PROJECT_NAME" - heading: "Introducing TensorFlow Privacy"
image_path: /resources/images/tf-logo-card-16x9.png image_path: /resources/images/tf-logo-card-16x9.png
path: https://blog.tensorflow.org path: https://blog.tensorflow.org/2019/03/introducing-tensorflow-privacy-learning.html
buttons: buttons:
- label: "Read on TensorFlow blog" - label: "Read on TensorFlow blog"
path: https://blog.tensorflow.org path: https://blog.tensorflow.org/2019/03/introducing-tensorflow-privacy-learning.html
- heading: "PROJECT_NAME video" - heading: "TensorFlow Privacy at TF Dev Summit 2020"
youtube_id: 3d34Hkf7KXA youtube_id: UEECKh6PLhI
buttons: buttons:
- label: Watch the video - label: Watch the video
path: https://www.youtube.com/watch?v=3d34Hkf7KXA path: https://www.youtube.com/watch?v=UEECKh6PLhI
- heading: "PROJECT_NAME on GitHub" - heading: "TensorFlow Privacy on GitHub"
image_path: /resources/images/github-card-16x9.png image_path: /resources/images/github-card-16x9.png
path: https://github.com/tensorflow/PROJECT_NAME path: https://github.com/tensorflow/privacy
buttons: buttons:
- label: "View on GitHub" - label: "View on GitHub"
path: https://github.com/tensorflow/PROJECT_NAME path: https://github.com/tensorflow/privacy