(*args, **kwargs)
return backend()['stop_gradient'](*args, **kwargs)
Identity on the forward pass but 0 (no gradient) on the backward pass.
Identity on the forward pass but 0 (no gradient) on the backward pass.
Identity on the forward pass but 0 ( no gradient ) on the backward pass .
def stop_gradient(*args, **kwargs):
  """Identity on the forward pass but 0 (no gradient) on the backward pass."""
  return backend()['stop_gradient'](*args, **kwargs)
def stop_gradient ( * args , * * kwargs ) : return backend ( ) [ 'stop_gradient' ] ( * args , * * kwargs )