docs icon indicating copy to clipboard operation
docs copied to clipboard

Update text_classification.ipynb

Open AnasNeumann opened this issue 3 years ago • 5 comments

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).

AnasNeumann avatar May 25 '22 08:05 AnasNeumann

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.

google-cla[bot] avatar May 25 '22 08:05 google-cla[bot]

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/docs

$ python3 -m tensorflow_docs.tools.nbfmt notebook.ipynb
$ python3 -m tensorflow_docs.tools.nblint --arg=repo:tensorflow/docs notebook.ipynb
If commits are added to the pull request, synchronize your local branch: git pull origin patch-1

github-actions[bot] avatar May 25 '22 08:05 github-actions[bot]

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)])

AnasNeumann avatar May 25 '22 17:05 AnasNeumann

Thanks @AnasNeumann ! @MarkDaoust What are you thoughts?

8bitmp3 avatar May 26 '22 11:05 8bitmp3

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/docs

$ python3 -m tensorflow_docs.tools.nbfmt notebook.ipynb
$ python3 -m tensorflow_docs.tools.nblint --arg=repo:tensorflow/docs notebook.ipynb
If commits are added to the pull request, synchronize your local branch: git pull origin patch-1

github-actions[bot] avatar May 26 '22 13:05 github-actions[bot]