GradOptions
On this page

GradOptions

Interface in IR

Options for grad.

import type { GradOptions } from 'typeshade'

The signature, the description and the examples come from the compiler's own source at commit 26de7be8.

Syntax

interface GradOptions {
readonly name?: string;
readonly direction?: readonly number[];
}

Instance properties

nameoptionalread only string

The name of the generated function. Defaults to <fn>_d_<param>.

directionoptionalread only readonly number[]

The direction to differentiate along when the parameter is a vector: the generated function returns the directional derivative, the Jacobian times this vector. Required for a vector parameter, refused for a scalar one.

See also

Source

src/core/passes/grad.ts, line 39, at commit 26de7be8

Edit this page Report a problem