MCPcopy Create free account
hub / github.com/SooLab/CGFormer / __init__

Method __init__

bert/modeling_bert.py:1390–1398  ·  view source on GitHub ↗
(self, config)

Source from the content-addressed store, hash-verified

1388)
1389class BertForTokenClassification(BertPreTrainedModel):
1390 def __init__(self, config):
1391 super().__init__(config)
1392 self.num_labels = config.num_labels
1393
1394 self.bert = BertModel(config)
1395 self.dropout = nn.Dropout(config.hidden_dropout_prob)
1396 self.classifier = nn.Linear(config.hidden_size, config.num_labels)
1397
1398 self.init_weights()
1399
1400 @add_start_docstrings_to_callable(BERT_INPUTS_DOCSTRING.format("(batch_size, sequence_length)"))
1401 @add_code_sample_docstrings(tokenizer_class=_TOKENIZER_FOR_DOC, checkpoint="bert-base-uncased")

Callers

nothing calls this directly

Calls 3

BertModelClass · 0.85
__init__Method · 0.45
init_weightsMethod · 0.45

Tested by

no test coverage detected