Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

text classification error #28

Closed
ruin2 opened this issue Dec 17, 2019 · 1 comment
Closed

text classification error #28

ruin2 opened this issue Dec 17, 2019 · 1 comment

Comments

@ruin2
Copy link

ruin2 commented Dec 17, 2019

image

i followed your codes to write a ten class textclassification and failed (output predictions are the same) , logits seems to be equal correspondingly. i dont konw why ,and ask for helps, thank you

my model is just that simple:
lbert(tokens)
dense(10)

but after i forze bert layers , and add some additional layers like lstm , it worked,well , accuracy is still under my expectation..

SORRY!
its my mistacks!
i wrote a wrong sequnces padder and a wrong tokenizer....
emmmmmmmmmmmmm

@ruin2 ruin2 closed this as completed Dec 17, 2019
@kpe
Copy link
Owner

kpe commented Dec 17, 2019

sequence classification with BERT should work well enough without an LSTM. As an example check https://github.com/kpe/bert-for-tf2/blob/master/examples/tpu_movie_reviews.ipynb

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants