onnx_gradient#

Reverse-mode automatic differentiation for ONNX graphs.

Provides two entry points that compute gradient FunctionProto objects from an ONNX graph description:

  • GradientOfNodes() — takes a sequence of NodeProto objects together with graph metadata (inputs, initializers, xs, y, zs) and returns a FunctionProto encoding the backward computation.

  • GradientOfFunction() — takes an existing FunctionProto together with xs, y, zs and returns the corresponding gradient FunctionProto.

See onnx_light.onnx_core.gradient for the Python interface. The shared differentiation engine itself lives in onnx_core; its API reference is documented under gradient (in particular gradient.h).