Skip to content

Commit e49bebf

Browse files
default detect_anomaly to True
default detect_anomaly to True as NaN or Inf losses usually don't make any sense
1 parent 4281b58 commit e49bebf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/lightning/pytorch/trainer/trainer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ def __init__(
124124
inference_mode: bool = True,
125125
use_distributed_sampler: bool = True,
126126
profiler: Optional[Union[Profiler, str]] = None,
127-
detect_anomaly: bool = False,
127+
detect_anomaly: bool = True,
128128
barebones: bool = False,
129129
plugins: Optional[Union[_PLUGIN_INPUT, list[_PLUGIN_INPUT]]] = None,
130130
sync_batchnorm: bool = False,

0 commit comments

Comments
 (0)