MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / _grad_pass_through_op

Function _grad_pass_through_op

tensorflow/python/ops/custom_gradient.py:453–460  ·  view source on GitHub ↗
(*args, **kwargs)

Source from the content-addressed store, hash-verified

451 """
452 @custom_gradient
453 def _grad_pass_through_op(*args, **kwargs):
454 def grad(*args, **kwargs):
455 variables = kwargs.get("variables")
456 if variables is not None:
457 # Variables involved in the wrapped op will not receive gradients.
458 return args, [None] * len(variables)
459 return args
460 return f(*args, **kwargs), grad
461 return tf_decorator.make_decorator(f, _grad_pass_through_op)

Callers

nothing calls this directly

Calls 1

fFunction · 0.70

Tested by

no test coverage detected