Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit cd714b1

Browse files
kgilliam125lesteve
authored andcommitted
[MRG] Added warning on keyboard interrupt during MLP fit (scikit-learn#7614)
1 parent ee3e617 commit cd714b1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sklearn/neural_network/multilayer_perceptron.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -562,7 +562,7 @@ def _fit_stochastic(self, X, y, activations, deltas, coef_grads,
562562
'converged yet.'
563563
% (), ConvergenceWarning)
564564
except KeyboardInterrupt:
565-
pass
565+
warnings.warn("Training interrupted by user.")
566566

567567
if early_stopping:
568568
# restore best weights

0 commit comments

Comments
 (0)