EmilyAlsentzer / clinicalBERT

repository for Publicly Available Clinical BERT Embeddings
MIT License
658 stars 134 forks source link

Weight initialization Error on using pretrained model in pytorch #16

Closed adiv5 closed 4 years ago

adiv5 commented 4 years ago

I am getting this error

Weights of BertForMultiLable not initialized from pretrained model: ['classifier.weight', 'classifier.bias']
Weights from pretrained model not used in BertForMultiLable: ['cls.predictions.bias', 'cls.predictions.transform.dense.weight', 'cls.predictions.transform.dense.bias', 'cls.predictions.transform.LayerNorm.weight', 'cls.predictions.transform.LayerNorm.bias', 'cls.predictions.decoder.weight', 'cls.seq_relationship.weight', 'cls.seq_relationship.bias']

while using the provided pretrained biobert from here in this repo. here is the issue for reference.

Is there some issue in the model?

EmilyAlsentzer commented 4 years ago

Hi Aditya,

Can you clarify what you are doing that gets this error? Are you trying to use clinical BERT model in the instructions provided by the Bert-Multi-Label-Text-Classification repo? Is the issue that it works when you use BERT but not clinical BERT or do you get the same error regardless of which BERT model you use?

EmilyAlsentzer commented 4 years ago

Closing this issue due to lack of activity. Feel free to reopen and provide more details.