stop_gradient

dragon.stop_gradient(
  inputs,
  **kwargs
)[source]

Return the identity of input with truncated gradient-flow.

The expression itself is unaffected, but gradient is stopped.

Parameters:
Returns:

dragon.Tensor – An identity of input.