Perhaps for private users running the example, you should allow users to stop training early, by wrapping the loop in:

```python
try:
  for ...
except KeyboardInterrupt:
  if not stats['accuracy_history']:
    raise