Show progress bar for each epoch during batchwise training in Keras

前端 未结 3 881
我寻月下人不归
我寻月下人不归 2020-12-23 19:34

When I load the whole dataset in memory and train the network in Keras using following code:

model.fit(X, y, nb_epoch=40, batch_size=32, validation_split=0.2         


        
3条回答
  •  心在旅途
    2020-12-23 20:10

    tqdm (version >= 4.41.0) has also just added built-in support for keras so you could do:

    from tqdm.keras import TqdmCallback
    ...
    model.fit(..., verbose=0, callbacks=[TqdmCallback(verbose=2)])
    

    This turns off keras' progress (verbose=0), and uses tqdm instead. For the callback, verbose=2 means separate progressbars for epochs and batches. 1 means clear batch bars when done. 0 means only show epochs (never show batch bars).

提交回复
热议问题