MCPcopy Index your code
hub / github.com/MotrixLab/MotionDiffuse / mean_flat

Function mean_flat

text2motion/models/gaussian_diffusion.py:156–160  ·  view source on GitHub ↗

Take the mean over all non-batch dimensions.

(tensor)

Source from the content-addressed store, hash-verified

154
155
156def mean_flat(tensor):
157 """
158 Take the mean over all non-batch dimensions.
159 """
160 return tensor.mean(dim=list(range(1, len(tensor.shape))))
161
162
163def normal_kl(mean1, logvar1, mean2, logvar2):

Callers 4

_vb_terms_bpdMethod · 0.85
training_lossesMethod · 0.85
_prior_bpdMethod · 0.85
calc_bpd_loopMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected