Skip to content

Interface: ModelNode ​

Defined in: ml/model.ts:14

One layer / op in a model graph.

Properties ​

flops? ​

ts
optional flops?: number;

Defined in: ml/model.ts:26

Multiply-accumulates / FLOPs, if known.


group? ​

ts
optional group?: string;

Defined in: ml/model.ts:28

Block or stage the layer belongs to ("layer1", "encoder.3", …).


id ​

ts
id: string;

Defined in: ml/model.ts:16

Unique id — a module path (features.0), an fx node name, or a tensor name.


name? ​

ts
optional name?: string;

Defined in: ml/model.ts:18

Display name. Defaults to id.


params? ​

ts
optional params?: number;

Defined in: ml/model.ts:24

Trainable parameter count.


shape? ​

ts
optional shape?: number[];

Defined in: ml/model.ts:22

Output tensor shape with the batch dim dropped, e.g. [64, 112, 112].


type ​

ts
type: string;

Defined in: ml/model.ts:20

Layer or op class: "Conv2d", "Linear", "ReLU", "Add", …

MIT licensed. WebGL2 required.