Skip to contents

Used by psolve() with requires_grad = TRUE and Problem$backward(). Stores a numeric array of the same shape as the leaf, or NULL (the default).

Usage

gradient(x)

gradient(x) <- value

Arguments

x

A Variable or Parameter.

value

A numeric array of the same shape as x, or NULL.

Value

The gradient (numeric array) or NULL.