Skip to content

Function: addModelGraph()

ts
function addModelGraph(plot, opts): ModelGraphHandle;

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

Draw a model architecture as a flat layered graph. Boxes are colored by layer family, residual/skip connections route around the trunk, and each box shows its type, name and output shape.

The aspect is locked for you (a schematic must not shear), the axes are blanked, and a purpose-built hover tooltip is attached — so pair it with new Plot(el, { hover: false }) to suppress the series tooltip it replaces.

Parameters

ParameterType
plotPlot
optsModelGraphOptions

Returns

ModelGraphHandle

MIT licensed. WebGL2 required.