---
title: "ClikaRT::graph::DefaultsOptions"
sidebar_label: "DefaultsOptions"
description: "Choices the optimizer's transforms read. Each default keeps the graph's input and output contract and serves every shape the graph admits."
---

<!-- Generated by tools/doxygen2mdx from Doxygen XML. Do not edit. -->

<span class="api-kind api-kind--struct">struct</span>

**Header:** `ClikaRT/graph/optimize.h`

Choices the optimizer's transforms read. Each default keeps the graph's input and output contract and serves every shape the graph admits.

## Data members

### specialize {#specialize}

<div class="api-signature">

`bool` **`specialize`** `= false`

</div>

For a graph compiled from ONNX: collapse the shape arithmetic that the compile's pinned input shapes ([`CompileOptions::specs`](./CompileOptions.md#specs), `sample_inputs`) fix, such as shape cones, masks and reshape templates, into constants. The graph then serves exactly the pinned shapes. Without pinned shapes, the arithmetic the model's own static shapes fix collapses either way. A traced graph ignores this field and follows [`shape_fixation`](./DefaultsOptions.md#shape_fixation).

<div class="api-declared">

Declared in `ClikaRT/graph/optimize.h`, line 32

</div>

### shape\_fixation {#shape_fixation}

<div class="api-signature">

`bool` **`shape_fixation`** `= false`

</div>

For a traced graph: collapse the shape arithmetic the traced signature's static dimensions fix. Off, a traced graph keeps every recorded shape computation, since collapsing them specializes it to the traced shapes. A graph compiled from ONNX ignores this field and follows [`specialize`](./DefaultsOptions.md#specialize).

<div class="api-declared">

Declared in `ClikaRT/graph/optimize.h`, line 38

</div>

### channels\_last\_inputs {#channels_last_inputs}

<div class="api-signature">

`bool` **`channels_last_inputs`** `= false`

</div>

Omit the standard channels-first to channels-last conversion where a model input enters through one; that input is then supplied channels-last (`[N, spatial..., C]`). Changes the input contract for exactly those inputs: read `inputs()` for the layout to supply.

<div class="api-declared">

Declared in `ClikaRT/graph/optimize.h`, line 43

</div>

### channels\_last\_outputs {#channels_last_outputs}

<div class="api-signature">

`bool` **`channels_last_outputs`** `= false`

</div>

The output-side peer: omit the channels-last to channels-first conversion where an output leaves through one, so that output is produced channels-last under its declared name. Read `outputs()` for the layout delivered.

<div class="api-declared">

Declared in `ClikaRT/graph/optimize.h`, line 48

</div>
