Does PL support customizing indicators in checkpoint callback? #9633
Answered
by
morestart
morestart
asked this question in
code help: CV
-
this is my val func: def validation_step(self, batch, batch_idx):
data = batch
output = self.forward(data['img'])
boxes, scores = self.postprocess(output.cpu().numpy(), batch['shape'])
raw_metric = self.metric(batch, (boxes, scores))
return raw_metric
def validation_epoch_end(self, outputs):
metric = self.metric.gather_measure(outputs)
self.log('recall', value=metric['recall'].avg)
self.log('precision', value=metric['precision'].avg)
self.log('hmean', value=metric['fmeasure'].avg)
return {'hmean': metric['fmeasure'].avg} this is my checkpoint callback: checkpoint_callback = ModelCheckpoint(
monitor='hmean',
mode='max',
dirpath='../det_weights',
filename='{epoch:02d}-{hmean:.2f}',
save_last=True,
)
checkpoint_callback.FILE_EXTENSION = '.pt' use this callback, i can only get a |
Beta Was this translation helpful? Give feedback.
Answered by
morestart
Sep 22, 2021
Replies: 1 comment 3 replies
-
i solvd this problem, thanks... |
Beta Was this translation helpful? Give feedback.
3 replies
Answer selected by
morestart
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
i solvd this problem, thanks...