Contents

computeAllGradients

The option to compute all gradients during graph compilation.

Declaration

static var computeAllGradients: MLCGraphCompilationOptions { get }

Discussion

Include this option to compute gradients for layers with or without parameters that only take input tensors.

For example, if the first layer of a graph is a convolution layer, the framework only computes the gradients for weights and biases associated with the convolution layer, but not the gradients for the input. Include this option if you want to compute all gradients for the input.

See Also

Creating Graph Compilation Options