mirror of
https://github.com/huggingface/transformers.git
synced 2025-07-03 12:50:06 +06:00
Add post_init() calls to EsmForMaskedLM, EsmForTokenClassification and EsmForSequenceClassification.
This commit is contained in:
parent
11dca07a10
commit
b9faf2f930
@ -1023,6 +1023,8 @@ class EsmForMaskedLM(EsmPreTrainedModel):
|
||||
|
||||
self.init_weights()
|
||||
|
||||
self.post_init()
|
||||
|
||||
def get_output_embeddings(self):
|
||||
return self.lm_head.decoder
|
||||
|
||||
@ -1127,6 +1129,8 @@ class EsmForSequenceClassification(EsmPreTrainedModel):
|
||||
|
||||
self.init_weights()
|
||||
|
||||
self.post_init()
|
||||
|
||||
@auto_docstring
|
||||
def forward(
|
||||
self,
|
||||
@ -1210,6 +1214,8 @@ class EsmForTokenClassification(EsmPreTrainedModel):
|
||||
|
||||
self.init_weights()
|
||||
|
||||
self.post_init()
|
||||
|
||||
@auto_docstring
|
||||
def forward(
|
||||
self,
|
||||
|
Loading…
Reference in New Issue
Block a user