MCPcopy Create free account
hub / github.com/Vchitect/Latte / mean_flat

Function mean_flat

models/utils.py:115–119  ·  view source on GitHub ↗

Take the mean over all non-batch dimensions.

(tensor)

Source from the content-addressed store, hash-verified

113
114
115def mean_flat(tensor):
116 """
117 Take the mean over all non-batch dimensions.
118 """
119 return tensor.mean(dim=list(range(1, len(tensor.shape))))
120
121
122def normalization(channels):

Callers

nothing calls this directly

Calls 1

meanMethod · 0.80

Tested by

no test coverage detected