MCPcopy Create free account
hub / github.com/MichSchli/AVeriTeC / __init__

Method __init__

models/DualEncoderModule.py:16–24  ·  view source on GitHub ↗
(self, tokenizer, model, learning_rate=1e-3)

Source from the content-addressed store, hash-verified

14class 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):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected