onnx tools#

Differences#

onnx_array_api.validation.diff.html_diff(text1: ModelProto | str, text2: ModelProto | str, title: str = 'html_diff', div_name: str = 'div_name', header: bool = True) str[source]#

Produces a HTML files showing the differences between two strings.

Parameters:
  • text1 – first string

  • text2 – second string

  • title – title

  • div – html format, section name

  • header – if True, add header and html main tags

Returns:

differences

onnx_array_api.validation.diff.text_diff(text1: ModelProto | str, text2: ModelProto | str) str[source]#

Produces a string showing the differences between two strings.

Parameters:
  • text1 – first string

  • text2 – second string

Returns:

differences

Protos#

onnx_array_api.validation.tools.randomize_proto(onx: ModelProto | GraphProto | FunctionProto | NodeProto | TensorProto) ModelProto | GraphProto | FunctionProto | NodeProto | TensorProto[source]#

Randomizes float initializers or constant nodes.

Parameters:

onx – onnx model or proto

Returns:

same object