def on_batch_end(self, data: Data) -> None: grads = tf.reduce_max(tf.abs(data.get('grads'))) print(grads)
def on_batch_end(self, data: Data) -> None: grads = torch.max(torch.abs(data.get('grads'))) print(grads)