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

Method __init__

bert/modeling_utils.py:908–912  ·  view source on GitHub ↗
(self, config)

Source from the content-addressed store, hash-verified

906 """ Compute SQuAD 2.0 answer class from classification and start tokens hidden states. """
907
908 def __init__(self, config):
909 super().__init__()
910 self.dense_0 = nn.Linear(config.hidden_size * 2, config.hidden_size)
911 self.activation = nn.Tanh()
912 self.dense_1 = nn.Linear(config.hidden_size, 1, bias=False)
913
914 def forward(self, hidden_states, start_states=None, start_positions=None, cls_index=None):
915 """

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected