tabensemb.model.AbstractNN.log_grad_norm#

method

AbstractNN.log_grad_norm(grad_norm_dict: Dict[str, float]) None#

Override this method to change the default behaviour of log_grad_norm.

If clipping gradients, the gradients will not have been clipped yet.

Parameters:

grad_norm_dict – Dictionary containing current grad norm metrics

Example:

# DEFAULT
def log_grad_norm(self, grad_norm_dict):
    self.log_dict(grad_norm_dict, on_step=True, on_epoch=True, prog_bar=False, logger=True)