MCPcopy
hub / github.com/yerfor/GeneFacePlusPlus / mean

Method mean

modules/eg3ds/torch_utils/training_stats.py:190–198  ·  view source on GitHub ↗

r"""Returns the mean of the scalars that were accumulated for the given statistic between the last two calls to `update()`, or NaN if no scalars were collected.

(self, name)

Source from the content-addressed store, hash-verified

188 return int(delta[0])
189
190 def mean(self, name):
191 r"""Returns the mean of the scalars that were accumulated for the
192 given statistic between the last two calls to `update()`, or NaN if
193 no scalars were collected.
194 """
195 delta = self._get_delta(name)
196 if int(delta[0]) == 0:
197 return float('nan')
198 return float(delta[1] / delta[0])
199
200 def std(self, name):
201 r"""Returns the standard deviation of the scalars that were

Callers 15

as_dictMethod · 0.95
__getitem__Method · 0.95
update_extra_stateMethod · 0.80
update_extra_stateMethod · 0.80
update_extra_stateMethod · 0.80
forwardMethod · 0.80
forwardMethod · 0.80
forwardMethod · 0.80
forwardMethod · 0.80
compute_prFunction · 0.80
compute_isFunction · 0.80
forwardMethod · 0.80

Calls 1

_get_deltaMethod · 0.95

Tested by 2

test_stepMethod · 0.64
test_stepMethod · 0.64