INNER CODE UNIT · Python

validation_step

lbcb-sci/RiNALMo · train_ncrna_classification.py:122

    def validation_step(self, batch, batch_idx):
        return self._validation_step(batch, batch_idx, split='val')
    
    def on_validation_epoch_end(self):
        self._on_epoch_end(split='val')
    
    def test_step(self, batch, batch_idx):
        return self._validation_step(batch, batch_idx, split='test')
    
    def on_test_epoch_end(self):
        self._on_epoch_end(split='test')

    def configure_optimizers(self):
        optimizer = AdamW(
            filter(lambda p: p.requires_grad, self.parameters()),
            lr=self.lr,
            weight_decay=self.weight_decay
        )

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…