reference#

ExtendedReferenceEvaluator#

class onnx_array_api.reference.ExtendedReferenceEvaluator(proto: Any, opsets: Dict[str, int] | None = None, functions: List[ReferenceEvaluator | FunctionProto] | None = None, verbose: int = 0, new_ops: List[OpRun] | None = None, **kwargs)[source]#

This class replaces the python implementation by custom implementation. The Array API extends many operator to all types not supported by the onnx specifications. The evaluator allows to test scenarios outside what an onnx backend bound to the official onnx operators definition could do.

from onnx.reference import ReferenceEvaluator
from onnx.reference.c_ops import Conv
ref = ReferenceEvaluator(..., new_ops=[Conv])