Skip to content
Discussion options

You must be logged in to vote

you can do:

class CustomModelCheckpoint(ModelCheckpoint):
    def on_validation_end(self, trainer, pl_module):
        score = trainer.callback_metrics[self.monitor]
        if score > some_threshold:
            super().on_validation_end(trainer, pl_module)


trainer = Trainer(callbacks=[CustomModelCheckpoint(...)])

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by skrish13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment