MCPcopy Create free account
hub / github.com/CompVis/zigma / mean_flat

Function mean_flat

transport/utils.py:12–16  ·  view source on GitHub ↗

Take the mean over all non-batch dimensions.

(x)

Source from the content-addressed store, hash-verified

10 return getattr(self, key)
11
12def mean_flat(x):
13 """
14 Take the mean over all non-batch dimensions.
15 """
16 return th.mean(x, dim=list(range(1, len(x.size()))))
17
18def log_state(state):
19 result = []

Callers 1

training_lossesMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected