Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Keras jupyter notebook outputs blocks during training

When using Keras in a Jupyter Notebook environment, during training my Notebook crashes. While running the fit function, apart from the normal training progress, a lot of squares appear. In fact, there are so many squares the browser crashes...

When running the same code in a normal terminal these squares do not appear.

Here is an example of the output:

Train on 33164 samples, validate on 8292 samples
Epoch 1/3
  960/33164 [..............................] - ETA: 46s - loss: 0.1997 - acc: 0.9394 

Hope anybody can help!

like image 970
rmeertens Avatar asked Feb 22 '17 08:02

rmeertens


1 Answers

see this issue on github

in short 4 options :

  • Use command lines instead of ipython notebooks
  • Use verbose=0 or verbose=2 in fit(), the first will not output anything, the second will only output one log line per epoch.
  • If you use tensorflow as backend you can monitor everything on tensorboard (slow but better than nothing)
  • You can use the RemoteMonitor callback but this seems to require a bit of work.

I hope this helps.

like image 179
Nassim Ben Avatar answered Nov 08 '22 20:11

Nassim Ben