MCPcopy Create free account
hub / github.com/Kitware/COAT / __init__

Method __init__

utils/utils.py:30–36  ·  view source on GitHub ↗
(self, window_size=20, fmt=None)

Source from the content-addressed store, hash-verified

28 """
29
30 def __init__(self, window_size=20, fmt=None):
31 if fmt is None:
32 fmt = "{median:.4f} ({global_avg:.4f})"
33 self.deque = deque(maxlen=window_size)
34 self.total = 0.0
35 self.count = 0
36 self.fmt = fmt
37
38 def update(self, value, n=1):
39 self.deque.append(value)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected