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 ofNodeProtoobjects together with graph metadata (inputs, initializers, xs, y, zs) and returns aFunctionProtoencoding the backward computation.GradientOfFunction()— takes an existingFunctionPrototogether with xs, y, zs and returns the corresponding gradientFunctionProto.
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).