当前位置: 首页 > 文档资料 > Edward 中文文档 >

ed.Progbar

优质
小牛编辑
130浏览
2023-12-01

ed.Progbar

Class Progbar

Aliases:

  • Class ed.Progbar
  • Class ed.util.Progbar

Defined in edward/util/progbar.py.

Methods

init

__init__(
    target,
    width=30,
    interval=0.01,
    verbose=1
)

(Yet another) progress bar.

Args:

  • target: int. Total number of steps expected.
  • width: int. Width of progress bar.
  • interval: float. Minimum time (in seconds) for progress bar to be displayed during updates.
  • verbose: int. Level of verbosity. 0 suppresses output; 1 is default.

update

update(
    current,
    values=None,
    force=False
)

Update progress bar, and print to standard output if force is True, or the last update was completed longer than interval amount of time ago, or current >= target.

The written output is the progress bar and all unique values.

Args:

  • current: int. Index of current step.
  • values: dict of str to float. Dict of name by value-for-last-step. The progress bar will display averages for these values.
  • force: bool. Whether to force visual progress update.