简体   繁体   中英

Why does my keras model terminate and freeze my notebook if I do more than one epoch?

I did 1 nb_epoch with batch sizes of 10 and it successfully completed. The accuracy rate was absolutely horrible coming in at a whopping 27%. I want to make it run on more than one epoch to see if the accuracy will, ideally, be above 80% or so, but it keeps freezing my Jupyter Notebook if I try to make it do more than one epoch. How can I fix this?

My backend is Theano just for clarification.

There is definitely a correlation between performance and batch_size. I tried doing batch_size=1 and it took 12s of horrifying, daunting, unforgivable time out of my day to do 1 epoch.

It takes time to run through the epochs and sometimes it looks like it freezes, but it still runs and if you wait long enough it will finish. Increasing the batch size makes it run through the epochs faster.

You probably have to look into more factors. Look at the system resources, eg CPU, Memory, Disk IO. (If you use linux, run sar command)

For me, I had other problem with frozen notebook, and it turns out to be the issue of low memory.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM