experimental_experiment.xbuilder.graph_builder

class experimental_experiment.xbuilder.graph_builder.FunctionOptions(export_as_function: bool = False, name: str = '', domain: str = '', external_threshold: int = 33554432, move_initializer_to_constant: bool = False, return_initializer: bool = False, inline: bool = False, merge_allowed: bool = False, rename_allowed: bool = False)[source]

Defines how local functions must behave.

Parameters:
  • name – function name

  • domain – function domain

  • export_as_function – export the onnx as functions or keep local function

  • external_threshold – whether or not keep initializer as input for the function or move them as constant of the function

  • move_initializer_to_constant – move initializers as constant first before creating the function proto, that depends on the size defined by external_threshold

  • return_initializer – return the remaining initializer and add them as input to the function

  • inline – inline functions

  • rename_allowed – allow to rename the function if a duplicate is detected

  • merge_allowed – allow to merge a function in case the same code is detected