Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
hub
/
github.com/dmlc/dgl
/ segment_reduce
Function
segment_reduce
python/dgl/backend/tensorflow/sparse.py:327–332 ·
view source on GitHub ↗
(op, x, offsets)
Source
from the content-addressed store, hash-verified
325
326
327
def
segment_reduce(op, x, offsets):
328
@tf.custom_gradient
329
def
_lambda(x):
330
return
segment_reduce_real(op, x, offsets)
331
332
return
_lambda(x)
333
334
335
def
scatter_add_real(x, idx, m):
Callers
nothing calls this directly
Calls
1
_lambda
Function · 0.85
Tested by
no test coverage detected