Commits

Olivier Grisel committed 64d4f6b

fix typo in early stopping criterion

Comments (0)

Files changed (1)

                     loss_history.append(loss(d))
                 t += 1
 
-                if stopping_tol is not None and t % stopping_size:
+                if stopping_tol is not None and t % stopping_size == 0:
                     if len(loss_history) >= 2 * stopping_size:
                         ss = stopping_size
                         previous_loss = average(loss_history[-2*ss:-ss])