pub fn stop_gradient<'graph, A, F: Float>(x: A) -> Tensor<'graph, F>
where
    A: AsRef<Tensor<'graph, F>> + Copy,
{
    let x = x.as_ref();
    let g = x.graph();
    Tensor::builder(g)
        .append_input(x, false)
        .set_differentiable(false)
        .build(gradient_ops::StopGradient)
}
/// Stops gradient propagation.
///
/// Guarantees that the gradient is not propagated to the tensors behind this
/// during gradient computation.
Stops gradient propagation.
Guarantees that the gradient is not propagated to the tensors behind this
during gradient computation.
Stops gradient propagation . Guarantees that the gradient is not propagated to the tensors behind this during gradient computation .
pub fn stop_gradient<'graph, A, F: Float>(x: A) -> Tensor<'graph, F>
where
    A: AsRef<Tensor<'graph, F>> + Copy,
{
    let x = x.as_ref();
    let g = x.graph();
    Tensor::builder(g)
        .append_input(x, false)
        .set_differentiable(false)
        .build(gradient_ops::StopGradient)
}
pub fn stop_gradient < ' graph , A , F : Float > ( x : A ) -> Tensor < ' graph , F > where A : AsRef < Tensor < ' graph , F > > + Copy , { let x = x . as_ref ( ) ; let g = x . graph ( ) ; Tensor :: builder ( g ) . append_input ( x , false ) . set_differentiable ( false ) . build ( gradient_ops :: StopGradient ) }
Stops gradient propagation.
Stops gradient propagation .
x
A
x
A