# draugr.torch_utilities.optimisation.debugging.gradients.flow.plot_grad_flow

draugr.torch_utilities.optimisation.debugging.gradients.flow.plot_grad_flow(model: Module, lines: bool = True, alpha: float = 0.5, line_width: float = 1.0) → None

  Plots the gradients flowing through different layers in the net during training. Can be used for checking for possible gradient vanishing / exploding problems.

  Usage: After value.backwards(), use plot_grad_flow(model) to visualize the gradient flow of model

  Parameters

    - model –

    - lines –

    - alpha –

    - line_width –