(self, tokenizer, model, learning_rate=1e-3)
| 14 | class DualEncoderModule(pl.LightningModule): |
| 15 | # Instantiate the model |
| 16 | def __init__(self, tokenizer, model, learning_rate=1e-3): |
| 17 | super().__init__() |
| 18 | self.tokenizer = tokenizer |
| 19 | self.model = model |
| 20 | self.learning_rate = learning_rate |
| 21 | |
| 22 | self.train_acc = torchmetrics.Accuracy() |
| 23 | self.val_acc = torchmetrics.Accuracy() |
| 24 | self.test_acc = torchmetrics.Accuracy() |
| 25 | |
| 26 | # Do a forward pass through the model |
| 27 | def forward(self, input_ids, **kwargs): |
nothing calls this directly
no outgoing calls
no test coverage detected