MCPcopy Create free account
hub / github.com/alibaba/euler / _GatherGrad

Function _GatherGrad

tf_euler/python/euler_ops/mp_ops.py:40–43  ·  view source on GitHub ↗
(op, grad)

Source from the content-addressed store, hash-verified

38
39@tf.RegisterGradient('MPGather')
40def _GatherGrad(op, grad):
41 params = op.inputs[0]
42 indices = op.inputs[1]
43 return [scatter_add(grad, indices, tf.shape(params)[0]), None]
44
45
46@tf.RegisterGradient('MPScatterAdd')

Callers

nothing calls this directly

Calls 1

scatter_addFunction · 0.85

Tested by

no test coverage detected