Keras verbose training progress bar writing a new line on each batch issue

前端 未结 7 1724
余生分开走
余生分开走 2020-12-09 09:09

running a Dense feed-forward neural net in Keras. there are class_weights for two outputs, and sample_weights for a third output. fore some reason it prints the progress ver

7条回答
  •  借酒劲吻你
    2020-12-09 09:37

    I've added built-in support for keras in tqdm so you could use it instead (pip install "tqdm>=4.41.0"):

    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).

    If there are problems with it please open an issue at https://github.com/tqdm/tqdm/issues

提交回复
热议问题