Train text classification model using vectors.tsv and metadata.tsv
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 20/100
- Issue type
- Documentation
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- python, tensorflow
- Domain
- machine-learning
Research direction
Start with the Keras pretrained word embeddings guide linked in the issue and inspect how vectors.tsv and metadata.tsv are generated. Determine whether those files are intended as inputs for an embedding layer and document the required conversion and vocabulary mapping. Done means a clear guide or example shows how to use these files for text classification.
Written by the indexing model from the issue text.
Description
Hi,
I have trained a text classification model that uses pre-trained word embeddings as per this guide https://keras.io/examples/nlp/pretrained_word_embeddings/
Next, I would like to take use the vectors.tsv and metadata.tsv generated by your code, to train a new text classification model.
The Keras guide in the link above has the following code:
from tensorflow.keras.layers import Embedding
embedding_layer = Embedding(
num_tokens,
embedding_dim,
embeddings_initializer=keras.initializers.Constant(**embedding_matrix**),
trainable=False,
)
I think the vectors.tsv file needs to be coverted into an array of floats to be used as embeddings_initializer. But I'm not sure what else needs to be done.
Do you have an additional guide on how to train text classification model using a new word embedding?
- Dominant language
- C++
- Stars
- 1.3k
- Forks
- 379
- Avg merge
- 3h 30m
- Merged PRs (30d)
- 8
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from tensorflow/text
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
tensorflow/text#1498 · 2 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
tensorflow/text#1497 ·
-
Difficulty 5/5 Over a week Newbie friendliness 20/100
tensorflow/text#1448 · 3 reactions ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
tensorflow/text#1421 · 2 comments · 1 reaction ·
-
Difficulty 3/5 1-2 days Newbie friendliness 38/100
tensorflow/text#1393 · 1 reaction ·
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
AXERA-TECH/ax-llm#77 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
games-on-whales/wolf#509 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
bug-unconfirmed
Difficulty 2/5 1-3 hours Newbie friendliness 76/100