Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/VisionRush/DeepFakeDefenders
/ reduce_tensor
Function
reduce_tensor
core/mengine.py:18–22 ·
view source on GitHub ↗
(tensor, n)
Source
from the content-addressed store, hash-verified
16
17
18
def
reduce_tensor(tensor, n):
19
rt = tensor.clone()
20
dist.all_reduce(rt, op=dist.ReduceOp.SUM)
21
rt /= n
22
return
rt
23
24
25
def
gather_tensor(tensor, n):
Callers
3
train_multi_class
Method · 0.85
val_multi_class
Method · 0.85
val_ema
Method · 0.85
Calls
1
clone
Method · 0.80
Tested by
no test coverage detected