MCPcopy Create free account
hub / github.com/TeleHuman/TextOp / sum_flat

Function sum_flat

TextOpRobotMDAR/robotmdar/diffusion/nn.py:93–97  ·  view source on GitHub ↗

Take the sum over all non-batch dimensions.

(tensor)

Source from the content-addressed store, hash-verified

91 return tensor.mean(dim=list(range(1, len(tensor.shape))))
92
93def sum_flat(tensor):
94 """
95 Take the sum over all non-batch dimensions.
96 """
97 return tensor.sum(dim=list(range(1, len(tensor.shape))))
98
99
100def normalization(channels):

Callers 1

masked_l2Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected