docs icon indicating copy to clipboard operation
docs copied to clipboard

Fix load_data/text.ipynb

Open 18520339 opened this issue 4 years ago • 1 comments

  1. Use Softmax activation for export_model that have num_labels > 1:
  • For models that have num_labels > 1, I think it would be more accurate when using Softmax activation instead of Sigmoid at the last layer, although it still gets the correct result with Sigmoid
  1. Use BinaryCrossentropy loss function for export_model in the last section:
  • The model in this section is for the Binary classification task. So for consistency, I think the loss function of the export_model should be BinaryCrossentropy

18520339 avatar Jul 19 '21 04:07 18520339

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 fix-load-data-text

github-actions[bot] avatar Jul 19 '21 04:07 github-actions[bot]