<jupyter_start><jupyter_text>Copyright 2018 The TensorFlow Authors.<jupyter_code>#@title 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
#
# https://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.<jupyter_output><empty_output><jupyter_text>Title      View on TensorFlow.org        Run in Google Colab        View source on GitHub   {**Fix these links**}  Overview{Include a paragraph or two explaining what this example demonstrates, who should be interested in it, and what you need to know before you get started.}  Setup<jupyter_code>from __future__ import absolute_import, division, print_function

import tensorflow as tf
tf.enable_eager_execution()

import numpy as np<jupyter_output><empty_output><jupyter_text>{Put all your imports and installs up into a setup section.}  Notes For general instructions on how to write docs for Tensorflow see [Writing TensorFlow Documentation](https://www.tensorflow.org/community/documentation).The tips below are specific to notebooks for tensorflow.  General* Include the collapsed license at the top (this uses Colab's "Form" mode to hide the cells).* Only include a single `H1` title.* Include the button-bar immediately under the `H1`.* Include an overview section before any code.* Put all your installs and imports in a setup section.* Always include the three `__future__` imports.* Save the notebook with the Table of Contents open.* Use python3 whenever possible.* Keep cells small (~max 20 lines).  Working in GitHub* Be consistent about how you save your notebooks, otherwise the JSON-diffs will be a mess.* This notebook has the "Omit code cell output when saving this notebook" option set. GitHub refuses to diff notebooks with large diffs (inline images).* [reviewnb.com](http://reviewnb.com) may help. You can access it using this bookmarklet:  ```   javascript:(function(){ window.open(window.location.toString().replace(/github\.com/, 'app.reviewnb.com')); })() ``` * To open a GitHub notebook in Colab use the [Open in Colab](https://chrome.google.com/webstore/detail/open-in-colab/iogfkhleblhcpcekbiedikdehleodpjo) extension (or make a bookmarklet).  * The easiest way to edit a notebook in GitHub is to open it with Colab from the branch you want to edit. Then use File --> Save a copy in GitHub, which will save it back to the branch you opened it from.* For PRs it's helpful to post a direct Colab link to the PR head: https://colab.research.google.com/github/{user}/{repo}/blob/{branch}/{path}.ipynb  Code* Notebooks are for people. Write code optimized for clarity.* Demonstrate small parts before combining them into something more complex. Like below:<jupyter_code>#Build the model
model = tf.keras.Sequential([
    tf.keras.layers.Dense(10, activation='relu'),
    tf.keras.layers.Dense(3)
])
# Run the model on a single batch of data, and inspect the output.
result = model(tf.constant(np.random.randn(10,5), dtype = tf.float32)).numpy()

print("min:", result.min())
print("max:", result.max())
print("mean:", result.mean())
print("shape:", result.shape)
# Compile the model for training
model.compile(optimizer=tf.keras.optimizers.Adam(),
              loss=tf.keras.losses.categorical_crossentropy)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.09221029452243325, 'fraction_numerical': 0.005780346820809248, 'mean_word_length': 4.861290322580645, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 14, 'https://': 4, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '3', 'dir': 'jupyter-structured-clean-dedup', 'id': '88332', 'license': 'Apache-2.0', 'n_tokens_mistral': 1015, 'n_tokens_neox': 975, 'n_words': 433, 'path': 'tools/templates/notebook.ipynb', 'repo_name': 'calebteo/docs', 'size': '3633'}