Shortcuts

finite_checks

Functions

detect_nan_parameters

Iterates over model parameters and prints gradients if any parameter is not finite.

print_nan_gradients

Iterates over model parameters and prints out parameter + gradient information if NaN.

Helper functions to detect NaN/Inf values.

pytorch_lightning.utilities.finite_checks.detect_nan_parameters(model)[source]

Iterates over model parameters and prints gradients if any parameter is not finite.

Raises

ValueError – If NaN or inf values are found

Return type

None

pytorch_lightning.utilities.finite_checks.print_nan_gradients(model)[source]

Iterates over model parameters and prints out parameter + gradient information if NaN.

Return type

None