MCPcopy Create free account
hub / github.com/alibaba/nann / gradient_override_map

Method gradient_override_map

tensorflow/tensorflow/python/framework/ops.py:4829–4887  ·  view source on GitHub ↗

EXPERIMENTAL: A context manager for overriding gradient functions. This context manager can be used to override the gradient function that will be used for ops within the scope of the context. For example: ```python @tf.RegisterGradient("CustomSquare") def _custom_square_g

(self, op_type_map)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 7

testOverrideGradientsMethod · 0.95
_lower_boundMethod · 0.80
_graph_mode_decoratorFunction · 0.80
testEmptyFailsMethod · 0.80
testNaNGradFailsMethod · 0.80
_call_flatMethod · 0.80

Calls 1

TypeErrorFunction · 0.85

Tested by 4

testOverrideGradientsMethod · 0.76
testEmptyFailsMethod · 0.64
testNaNGradFailsMethod · 0.64