tensorflow / hub

A library for transfer learning by reusing parts of TensorFlow models.
https://tensorflow.org/hub
Apache License 2.0
3.48k stars 1.66k forks source link

Example is not question classification #346

Closed zzj0402 closed 5 years ago

zzj0402 commented 5 years ago

In the second example of Universal Sentence Encoder, the link directs to a sentiment classification instead of a "question" classification.

https://tfhub.dev/google/universal-sentence-encoder/2 https://colab.research.google.com/github/tensorflow/hub/blob/master/docs/tutorials/text_classification_with_tf_hub.ipynb#scrollTo=N6ZDpd9XzFeN

arnoegw commented 5 years ago

Indeed, the section titled "Classification" on page https://tfhub.dev/google/universal-sentence-encoder/2 shows a picture about binary classificaton of sentences as question or not, but the linked colab notebook https://colab.research.google.com/github/tensorflow/hub/blob/master/docs/tutorials/text_classification_with_tf_hub.ipynb is about classifying positive vs negative sentiment.

To my understanding, that's because the two pictures in sections "Semantic Similarity" and "Classification" show the same inputs but a different use of their embeddings. The actual colabs cannot run on just those three examples pictured, and instead use larger, well-known datasets for the respective kind of problem. The reader is being asked to abstract from the concrete problem to its underlying structure.

To me, this looks "working as intended".

zzj0402 commented 5 years ago

To me that is an illustration error.