Contents

stopGradient(for:)

Adds the tensors that you specify, to indicate which contributions the graph excludes when computing gradients during gradient pass.

Declaration

func stopGradient(for tensors: [MLCTensor]) -> Bool

Parameters

  • tensors:

    An array that contains the tensors whose contributions the graph excludes.

Return Value

true if the operation was successful.

See Also

Preparing Training Graphs