compute_gradient_norm

class maze.train.utils.train_utils.compute_gradient_norm(params: Iterable[torch.Tensor])

Computes the cumulative gradient norm of all provided parameters.

Parameters

params – Iterable over model parameters.

Returns

The cumulative gradient norm.