MCPcopy Create free account
hub / github.com/VisionRush/DeepFakeDefenders / gather_tensor

Function gather_tensor

core/mengine.py:25–28  ·  view source on GitHub ↗
(tensor, n)

Source from the content-addressed store, hash-verified

23
24
25def gather_tensor(tensor, n):
26 rt = [torch.zeros_like(tensor) for _ in range(n)]
27 dist.all_gather(rt, tensor)
28 return torch.cat(rt, dim=0)
29
30
31class TrainEngine(object):

Callers 2

val_multi_classMethod · 0.85
val_emaMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected