Skip to content

Interface: ModelGraph3DOptions

Defined in: ml/model-chart.ts:392

Extends

Properties

branchSpacing?

ts
optional branchSpacing?: number;

Defined in: ml/model-chart.ts:399

Lateral offset between branches that share a rank. Default 3.


colors?

ts
optional colors?: Partial<Record<LayerCategory, string>>;

Defined in: ml/model-chart.ts:395

Per-category color overrides (merged over LAYER_COLORS).


connectorColor?

ts
optional connectorColor?: string;

Defined in: ml/model-chart.ts:431


connectors?

ts
optional connectors?: boolean;

Defined in: ml/model-chart.ts:430

Draw connectors between blocks. Default true.


direction?

ts
optional direction?: "vertical" | "horizontal";

Defined in: ml/model.ts:525

Flow direction: "vertical" top→bottom (default) or "horizontal" left→right.

Inherited from

ModelLayoutOptions.direction


graph

ts
graph: ModelGraph;

Defined in: ml/model-chart.ts:393


labelColor?

ts
optional labelColor?: string;

Defined in: ml/model-chart.ts:440


labelFont?

ts
optional labelFont?: string;

Defined in: ml/model-chart.ts:441


labels?

ts
optional labels?: "none" | "type" | "name" | "full";

Defined in: ml/model-chart.ts:439

Text pinned above each block: "name" (default) the layer name, "type" its class, "full" the name above and the output shape below, "none" to rely on the hover tooltip alone.


maxFace?

ts
optional maxFace?: number;

Defined in: ml/model.ts:822

Height / lateral depth of the largest feature-map face. Default 2.2.

Inherited from

ModelBoxSizing.maxFace


maxSlices?

ts
optional maxSlices?: number;

Defined in: ml/model-chart.ts:419

Cap per axis, so a 512-channel block does not become a solid smear. Default 12. With slices: "voxels" this bounds every axis, so the default draws at most 12³ cubes per layer — raise it for the literal grid.


maxThickness?

ts
optional maxThickness?: number;

Defined in: ml/model.ts:820

Thickness of the widest layer along the flow axis (channels). Default 0.9.

Inherited from

ModelBoxSizing.maxThickness


maxVoxels?

ts
optional maxVoxels?: number;

Defined in: ml/model-chart.ts:426

Total cube budget per layer for slices: "voxels". When the capped grid would exceed it, all three axes are scaled down together so the proportions survive. Default 20 000 — raise it deliberately, since the count is the product of three dimensions.


minSize?

ts
optional minSize?: number;

Defined in: ml/model.ts:824

Floor (world units) applied to every axis so singleton dims stay visible. Default 0.08.

Inherited from

ModelBoxSizing.minSize


name?

ts
optional name?: string;

Defined in: ml/model-chart.ts:444


nodeGap?

ts
optional nodeGap?: number;

Defined in: ml/model.ts:533

Gap between siblings inside a rank. Default 0.6.

Inherited from

ModelLayoutOptions.nodeGap


nodeHeight?

ts
optional nodeHeight?: number;

Defined in: ml/model.ts:529

Box height in data units. Default 0.9.

Inherited from

ModelLayoutOptions.nodeHeight


nodeWidth?

ts
optional nodeWidth?: number;

Defined in: ml/model.ts:527

Box width in data units. Default 2.6.

Inherited from

ModelLayoutOptions.nodeWidth


opacity?

ts
optional opacity?: number;

Defined in: ml/model-chart.ts:433

Block opacity, 0..1. Default 1.


rankGap?

ts
optional rankGap?: number;

Defined in: ml/model.ts:531

Gap between consecutive ranks. Default 0.7.

Inherited from

ModelLayoutOptions.rankGap


rankSpacing?

ts
optional rankSpacing?: number;

Defined in: ml/model-chart.ts:397

Clear space between consecutive layer blocks along the flow axis. Default 1.1.


sizeBy?

ts
optional sizeBy?: "none" | "params" | "flops";

Defined in: ml/model.ts:538

Scale the box across the flow (width when vertical, height when horizontal) by a metric, so heavy layers read as bigger. Default "none".

Inherited from

ModelLayoutOptions.sizeBy


sizeRange?

ts
optional sizeRange?: Range;

Defined in: ml/model.ts:540

Multiplier range applied when sizeBy is set. Default [0.55, 1.5].

Inherited from

ModelLayoutOptions.sizeRange


sizeScale?

ts
optional sizeScale?: "linear" | "log" | "sqrt";

Defined in: ml/model.ts:818

Compression applied to each tensor dim before scaling. Default "log".

Inherited from

ModelBoxSizing.sizeScale


sliceGap?

ts
optional sliceGap?: number;

Defined in: ml/model-chart.ts:428

Fraction of each slice's cell left empty as the gap, 0..1. Default 0.35.


slices?

ts
optional slices?: number | "none" | "channels" | "voxels";

Defined in: ml/model-chart.ts:413

Draw each block as a stack of slices along the flow axis instead of one solid cuboid — the classic feature-map look, where [3, 224, 224] reads as three separate planes rather than a single slab.

"channels" uses the layer's own channel count, a number uses that many for every layer, "none" (default) keeps one block. "voxels" goes further and subdivides all three axes — a [3, 224, 224] layer becomes a real channels × height × width grid of cubes rather than 3 planes.

The stack occupies exactly the same space either way, so the layout does not shift.


subLabelColor?

ts
optional subLabelColor?: string;

Defined in: ml/model-chart.ts:442


subLabelFont?

ts
optional subLabelFont?: string;

Defined in: ml/model-chart.ts:443


sweeps?

ts
optional sweeps?: number;

Defined in: ml/model.ts:542

Barycenter passes used to reduce edge crossings. Default 4.

Inherited from

ModelLayoutOptions.sweeps

MIT licensed. WebGL2 required.