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:
- inputs (dragon.Tensor) – The input tensor.
- Returns:
dragon.Tensor – An identity of input.