def set_clip_grad_norm(self, clip_grad_norm: Optional[float]):
    'Sets maximum gradient norm.\n\n        None means gradient clipping is disabled. Defaults to None.'
    self.clip_grad_norm = clip_grad_norm
    if (clip_grad_norm is None):
        logging.info('Disabled gradient norm clipping.')
    else:
        logging.info(f'Enabled gradient norm clipping with threshold: {clip_grad_norm}')
    return self
Sets maximum gradient norm.

None means gradient clipping is disabled. Defaults to None.
def set_clip_grad_norm(self, clip_grad_norm: Optional[float]):
    'Sets maximum gradient norm.\n\n        None means gradient clipping is disabled. Defaults to None.'
    self.clip_grad_norm = clip_grad_norm
    if (clip_grad_norm is None):
        logging.info('Disabled gradient norm clipping.')
    else:
        logging.info(f'Enabled gradient norm clipping with threshold: {clip_grad_norm}')
    return self