(*args, **kwargs)
| 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) |