docs
docs copied to clipboard
Update text_classification.ipynb
This line was a mistake and probably comes from this page: https://www.tensorflow.org/text/guide/word_embeddings (the model is almost the same except for the Dense(16, activation='relu') layer).
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).
View this failed invocation of the CLA check for more information.
For the most up to date status, view the checks section at the bottom of the pull request.
Preview
Preview and run these notebook edits with Google Colab: Rendered notebook diffs available on ReviewNB.com.Format and style
Use the TensorFlow docs notebook tools to format for consistent source diffs and lint for style:$ python3 -m pip install -U --user git+https://github.com/tensorflow/docsIf commits are added to the pull request, synchronize your local branch:
$ python3 -m tensorflow_docs.tools.nbfmt notebook.ipynb
$ python3 -m tensorflow_docs.tools.nblint --arg=repo:tensorflow/docs notebook.ipynb
git pull origin patch-1
If I'm not mistaken and the "fully-connected Dense layer" is missing, another possible correction could be to update the model and fit the description:
model = tf.keras.Sequential([
layers.Embedding(max_features + 1, embedding_dim),
layers.Dropout(0.2),
layers.GlobalAveragePooling1D(),
layers.Dense(16, activation='relu'),
layers.Dropout(0.2),
layers.Dense(1)])
Thanks @AnasNeumann ! @MarkDaoust What are you thoughts?
Preview
Preview and run these notebook edits with Google Colab: Rendered notebook diffs available on ReviewNB.com.Format and style
Use the TensorFlow docs notebook tools to format for consistent source diffs and lint for style:$ python3 -m pip install -U --user git+https://github.com/tensorflow/docsIf commits are added to the pull request, synchronize your local branch:
$ python3 -m tensorflow_docs.tools.nbfmt notebook.ipynb
$ python3 -m tensorflow_docs.tools.nblint --arg=repo:tensorflow/docs notebook.ipynb
git pull origin patch-1