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

Method _get_delta

modules/eg3ds/torch_utils/training_stats.py:172–180  ·  view source on GitHub ↗

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

(self, name)

Source from the content-addressed store, hash-verified

170 self._moments[name] = delta
171
172 def _get_delta(self, name):
173 r"""Returns the raw moments that were accumulated for the given
174 statistic between the last two calls to `update()`, or zero if
175 no scalars were collected.
176 """
177 assert self._regex.fullmatch(name)
178 if name not in self._moments:
179 self._moments[name] = torch.zeros([_num_moments], dtype=_counter_dtype)
180 return self._moments[name]
181
182 def num(self, name):
183 r"""Returns the number of scalars that were accumulated for the given

Callers 3

numMethod · 0.95
meanMethod · 0.95
stdMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected