Method
__init__
(self, num_classes, hidden_size, dropout_prob)
Source from the content-addressed store, hash-verified
| 1459 | """ |
| 1460 | |
| 1461 | def __init__(self, num_classes, hidden_size, dropout_prob): |
| 1462 | super().__init__() |
| 1463 | use_cfg_embedding = dropout_prob > 0 |
| 1464 | self.embedding_table = nn.Embedding(num_classes + use_cfg_embedding, hidden_size) |
| 1465 | self.num_classes = num_classes |
| 1466 | self.dropout_prob = dropout_prob |
| 1467 | |
| 1468 | def token_drop(self, labels, force_drop_ids=None): |
| 1469 | """ |
Callers
nothing calls this directly
Tested by
no test coverage detected