jax-js
    Preparing search index...

    Interface GradientTransformation

    A pair of pure functions implementing a gradient transformation.

    Optimizers are implemented with this interface. They do not contain any internal state. The "optimizer state" OptState is initialized, then passed into each update call, which returns a new state.

    Gradients are transformed during the update call, and they should have the same PyTree shape as the parameters.

    interface GradientTransformation {
        init<Params extends JsTree<Array>>(params: Params): OptState;
        update<Params extends JsTree<Array>>(
            updates: Params,
            state: OptState,
            params?: Params,
        ): [Params, OptState];
    }

    Methods