MCPcopy
hub / github.com/SizheAn/PanoHead / as_dict

Method as_dict

torch_utils/training_stats.py:214–226  ·  view source on GitHub ↗

r"""Returns the averages accumulated between the last two calls to `update()` as an `dnnlib.EasyDict`. The contents are as follows: dnnlib.EasyDict( NAME = dnnlib.EasyDict(num=FLOAT, mean=FLOAT, std=FLOAT), ... )

(self)

Source from the content-addressed store, hash-verified

212 return np.sqrt(max(raw_var - np.square(mean), 0))
213
214 def as_dict(self):
215 r"""Returns the averages accumulated between the last two calls to
216 `update()` as an `dnnlib.EasyDict`. The contents are as follows:
217
218 dnnlib.EasyDict(
219 NAME = dnnlib.EasyDict(num=FLOAT, mean=FLOAT, std=FLOAT),
220 ...
221 )
222 """
223 stats = dnnlib.EasyDict()
224 for name in self.names():
225 stats[name] = dnnlib.EasyDict(num=self.num(name), mean=self.mean(name), std=self.std(name))
226 return stats
227
228 def __getitem__(self, name):
229 r"""Convenience getter.

Callers 1

training_loopFunction · 0.95

Calls 4

namesMethod · 0.95
numMethod · 0.95
meanMethod · 0.95
stdMethod · 0.95

Tested by

no test coverage detected