jacinle.utils.meter#

Classes

AverageMeter

Computes and stores the average and current value

GroupMeters

Class AverageMeter

class AverageMeter[source]#

Bases: object

Computes and stores the average and current value

__init__()[source]#
__new__(**kwargs)#
reset()[source]#
update(val, n=1)[source]#
avg: float = 0#
count: float = 0#
std: float = 0#
sum: float = 0#
sum2: float = 0#
tot_count: float = 0#
val: float = 0#

Class GroupMeters

class GroupMeters[source]#

Bases: object

__init__()[source]#
__new__(**kwargs)#
dump(filename, values='avg')[source]#
format(caption, values, kv_format, glue)[source]#
format_simple(caption=None, values='avg', compressed=True)[source]#
items()[source]#
reset()[source]#
update(updates=None, value=None, n=1, prefix=None, **kwargs)[source]#

Update the meters.

Examples

>>> meters.update(key, value)
>>> meters.update({key1: value1, key2: value2})
>>> meters.update(key1=value1, key2=value2)
property avg#
property count#
property std#
property sum#
property val#