mirror of
https://github.com/wassname/ml-debug.git
synced 2026-09-26 14:00:26 +08:00
1 line
1.7 KiB
JSON
1 line
1.7 KiB
JSON
{"root_cause":"The validation pass is probably running with the model still in training mode. no_grad disables gradient recording but does not disable dropout or batch-normalization updates, so dropout remains stochastic and batch normalization uses and updates batch statistics.","confidence":0.94,"evidence":["Observation: Repeated validation passes use the same frozen batch but produce different predictions and losses.","Observation: The model contains dropout and batch-normalization modules.","Observation: Validation uses no_grad, but the module training flag is not logged.","Inference: Input variation is ruled out by the frozen batch, making model-state stochasticity the leading explanation.","Inference: If model.training is True, active dropout directly explains stochastic predictions, while training-mode batch normalization can also mutate running statistics across passes."],"competing_hypotheses":["A stochastic operation other than dropout is active during validation.","Model parameters or buffers are being mutated elsewhere between validation passes.","Validation preprocessing or the supposedly frozen batch is not actually deterministic."],"first_action":"Log model.training immediately before validation and repeat the frozen-batch pass after calling model.eval(); compare predictions and loss across repetitions.","prediction_if_true":"model.training is currently True, and repeated outputs become identical or numerically indistinguishable after model.eval().","prediction_if_false":"model.training is already False or outputs still vary after model.eval(), so the next check is parameter/buffer mutation and other stochastic operations.","immediate_changes":[],"fallback_logic":[]} |