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

distilBERT error #242

Closed
ericluo04 opened this issue Sep 3, 2020 · 1 comment
Closed

distilBERT error #242

ericluo04 opened this issue Sep 3, 2020 · 1 comment
Labels
user question Further information is requested

Comments

@ericluo04
Copy link

I get the following error when using distilBERT to fine-tune on a text classification task:

tDBERT, learnerDBERT = ktrainModel("distilbert-base-uncased", max_words, class_names, 
                                   x_train_uncleaned_raw, y_train_uncleaned_raw-1, 
                                   x_test_uncleaned_raw, y_test_uncleaned_raw-1, 
                                   batchSizeTransformer)

Some weights of the model checkpoint at distilbert-base-uncased were not used when initializing TFDistilBertForSequenceClassification: ['vocab_projector', 'vocab_layer_norm', 'activation_13', 'vocab_transform']
- This IS expected if you are initializing TFDistilBertForSequenceClassification from the checkpoint of a model trained on another task or with another architecture (e.g. initializing a BertForSequenceClassification model from a BertForPretraining model).
- This IS NOT expected if you are initializing TFDistilBertForSequenceClassification from the checkpoint of a model that you expect to be exactly identical (initializing a BertForSequenceClassification model from a BertForSequenceClassification model).
Some weights of TFDistilBertForSequenceClassification were not initialized from the model checkpoint at distilbert-base-uncased and are newly initialized: ['classifier', 'pre_classifier', 'dropout_19']
You should probably TRAIN this model on a down-stream task to be able to use it for predictions and inference.

At least for my task, performance doesn't seem to be affected, but I was wondering if this error is problematic in any way.

@amaiya
Copy link
Owner

amaiya commented Sep 3, 2020

Hello - thanks for letting me know.

This is a weird but harmless warning that I believe was introduced in transformers==3.1.0 that is confusing many others as well. I have suppressed this warning in v0.21.0 of ktrain.

@amaiya amaiya closed this as completed Sep 3, 2020
@amaiya amaiya added the user question Further information is requested label Sep 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
user question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants