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

BertForMultiLabelSequenceClassification not initialized #132

Open
DraculaXly opened this issue Nov 28, 2019 · 4 comments
Open

BertForMultiLabelSequenceClassification not initialized #132

DraculaXly opened this issue Nov 28, 2019 · 4 comments

Comments

@DraculaXly
Copy link

11/28/2019 20:03:03 - INFO - transformers.modeling_utils - loading weights file chinese_L-12_H-768_A-12\pytorch_model.bin
11/28/2019 20:03:05 - INFO - transformers.modeling_utils - Weights of BertForMultiLabelSequenceClassification not initialized from pretrained model: ['classifier.weight', 'classifier.bias']
11/28/2019 20:03:05 - INFO - transformers.modeling_utils - Weights from pretrained model not used in BertForMultiLabelSequenceClassification: ['cls.predictions.bias', 'cls.predictions.transform.dense.weight', 'cls.predictions.transform.dense.bias', 'cls.predictions.decoder.weight', 'cls.seq_relationship.weight', 'cls.seq_relationship.bias', 'cls.predictions.transform.LayerNorm.weight', 'cls.predictions.transform.LayerNorm.bias'

When I use MultiLabels, I got the message above.
First, I have downloaded the pytorch_model.bin, vocab.txt and config.json.
Second, Should the label value be only 0 or 1? Because each of my label has four values [-2, -1, 0 ,1].

@zampierimatteo91
Copy link

I believe the labels should be binarized.

@adiv5
Copy link

adiv5 commented Dec 5, 2019

Getting the same issue about initializations.any update?

@muzier
Copy link

muzier commented Dec 12, 2019

11/28/2019 20:03:03 - INFO - transformers.modeling_utils - loading weights file chinese_L-12_H-768_A-12\pytorch_model.bin
11/28/2019 20:03:05 - INFO - transformers.modeling_utils - Weights of BertForMultiLabelSequenceClassification not initialized from pretrained model: ['classifier.weight', 'classifier.bias']
11/28/2019 20:03:05 - INFO - transformers.modeling_utils - Weights from pretrained model not used in BertForMultiLabelSequenceClassification: ['cls.predictions.bias', 'cls.predictions.transform.dense.weight', 'cls.predictions.transform.dense.bias', 'cls.predictions.decoder.weight', 'cls.seq_relationship.weight', 'cls.seq_relationship.bias', 'cls.predictions.transform.LayerNorm.weight', 'cls.predictions.transform.LayerNorm.bias'

When I use MultiLabels, I got the message above.
First, I have downloaded the pytorch_model.bin, vocab.txt and config.json.
Second, Should the label value be only 0 or 1? Because each of my label has four values [-2, -1, 0 ,1].

Where do you put the pretrained model config file in the package? Thanks~

@yunju63
Copy link

yunju63 commented Dec 27, 2019

It is because the weights which are specific for fine-tuning do not(and of course can not) come from pertained model. Also, the weights specific for pre-training are not used in fine-tuning.

Refer to this issue

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

5 participants