Method
__init__
(self, num_classes, hidden_size, dropout_prob)
Source from the content-addressed store, hash-verified
| 387 | """ |
| 388 | |
| 389 | def __init__(self, num_classes, hidden_size, dropout_prob): |
| 390 | super().__init__() |
| 391 | use_cfg_embedding = dropout_prob > 0 |
| 392 | self.embedding_table = nn.Embedding(num_classes + use_cfg_embedding, hidden_size) |
| 393 | self.num_classes = num_classes |
| 394 | self.dropout_prob = dropout_prob |
| 395 | |
| 396 | def token_drop(self, labels, force_drop_ids=None): |
| 397 | """ |
Callers
nothing calls this directly
Tested by
no test coverage detected