DefaultsOptions
The choices ModelGraph.optimize() hands the optimizer's transforms. Each default keeps the graph's input and output contract and serves every shape the graph admits.
channels_last_inputs (property)
Omit the channels-first to channels-last conversion where a model input enters through one, so that input is supplied channels-last; inputs() reports the layout to supply.
channels_last_outputs (property)
Omit the channels-last to channels-first conversion where an output leaves through one, so that output is produced channels-last; outputs() reports the layout delivered.
shape_fixation (property)
For a traced graph: collapse the shape arithmetic the traced signature's static dimensions fix, which specializes the graph to the traced shapes. A graph compiled from ONNX follows specialize.
specialize (property)
For a graph compiled from ONNX: collapse the shape arithmetic the compile's pinned input shapes fix (shape cones, masks, reshape templates) into constants, so the graph serves exactly the pinned shapes. A traced graph follows shape_fixation.
__init__
__init____init__(self, *, specialize: bool = False, shape_fixation: bool = False, channels_last_inputs: bool = False, channels_last_outputs: bool = False) -> None
init(self, *, specialize: bool = False, shape_fixation: bool = False, channels_last_inputs: bool = False, channels_last_outputs: bool = False) -> None
DefaultsOptions(*, specialize=False, shape_fixation=False, channels_last_inputs=False, channels_last_outputs=False)
The transforms' choices for one optimize() call.