MCPcopy Create free account
hub / github.com/OpenGVLab/HumanBench / tb_logging

Method tb_logging

PATH/core/solvers/solver.py:489–504  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

487 self.optimizer.step()
488
489 def tb_logging(self):
490 tmp = self.tmp
491 ginfo = self.ginfo
492
493 for tid,ii in enumerate(ginfo.task_root_ranks):
494 self.tb_logger.add_scalar('loss_{}'.format(ginfo.task_names[tid]), tmp.loss_list[ii], tmp.current_step)
495 self.tb_logger.add_scalar('top1_{}'.format(ginfo.task_names[tid]), tmp.top1_list[ii], tmp.current_step)
496
497 if self.clip_grad_backbone > 0:
498 self.tb_logger.add_scalar('backbone_grad_norm_{}'.format(ginfo.task_names[tid]), tmp.backbone_grad_norm_list[ii], tmp.current_step)
499 if self.clip_grad_neck > 0:
500 self.tb_logger.add_scalar('neck_grad_norm_{}'.format(ginfo.task_names[tid]), tmp.neck_grad_norm_list[ii], tmp.current_step)
501 if self.clip_grad_decoder > 0:
502 self.tb_logger.add_scalar('decoder_grad_norm_{}'.format(ginfo.task_names[tid]), tmp.decoder_grad_norm_list[ii], tmp.current_step)
503
504 self.tb_logger.add_scalar('lr', tmp.current_lr, tmp.current_step)
505
506 def logging(self):
507 tmp = self.tmp

Callers 1

runMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected