MAIDR JavaScript API
    Preparing search index...

    Interface DirectedGraphPoint

    One node of a directed graph -- one op or layer of a computation graph.

    The edges are declared on the node they arrive at, as inputs: that is how a TensorFlow GraphDef names them (NodeDef.input) and how a Keras layer names its inbound layers, so a producer copies a field rather than inverting one. Edge order is node order, then input order -- the order the edge selectors would be in.

    Scopes are declared as a path, the way TreemapPoint.path declares a hierarchy: acyclic by construction, impossible to orphan, and already what a TensorFlow name scope is (block1/conv1/Conv2D is the path ['block1', 'conv1'] and the node Conv2D).

    { id: 'block1/add', label: 'add', path: ['block1'],
    * inputs: ['block1/conv2', 'input_1'],
    * attributes: { 'Layer type': 'Add', 'Output shape': '(None, 32, 32, 64)' } }
    interface DirectedGraphPoint {
        id: string | number;
        label?: string | number;
        path?: (string | number)[];
        inputs?: (string | number)[];
        inputLabels?: (string | number | null)[];
        inputEdges?: (string | number | null)[];
        attributes?: Record<string, string | number | boolean>;
    }
    Index

    Properties

    id: string | number

    What the other nodes' inputs name this one by. Unique in the layer.

    label?: string | number

    What the node is called when it is announced. Defaults to id.

    path?: (string | number)[]

    The scopes the node sits in, outermost first, excluding the node itself. A node at the top level omits it or declares [].

    inputs?: (string | number)[]

    The ids of the nodes feeding this one, in the order it takes them. An id naming no declared node, and a node naming itself, are ignored.

    inputLabels?: (string | number | null)[]

    What each edge in inputs is called, index for index: the Yes and No of a flowchart's decision, a state machine's event, a relationship's verb. null, an empty string or a missing entry leaves that edge unnamed. An edge declared more than once carries each distinct label it was given, in declared order.

    Announced beside the node's name wherever the edge is heard -- the from and to lists, and the description's inputs and outputs -- because on a diagram the label is often the only thing that says which way a branch goes.

    { id: 'approve', inputs: ['review', 'review'], inputLabels: ['yes', null] }
    
    inputEdges?: (string | number | null)[]

    Which drawn edge each edge in inputs is, index for index, where the diagram draws one edge that is declared as several:

    • a line drawn with no arrow, or with an arrow at each end, which runs both ways and so is declared once from each end;
    • an edge into or out of a scope -- a transition out of a composite state -- declared once for each node it enters or leaves.

    Edges sharing an id are one edge: the description counts it once, lists the copies arriving from or leaving for one scope as that scope, and does not call a line declared each way a cycle. Moves are unchanged, as every declared edge is still one a reader can follow. null, an empty string or a missing entry leaves that edge an edge of its own, apart from any drawn edge between the same two nodes. Ids are compared as text, so the two directions of a line must carry the same one.

    // A line drawn between Database and Storage, with no arrow.
    [{ id: 'db', inputs: ['disk'], inputEdges: ['db-disk'] }, { id: 'disk', inputs: ['db'], inputEdges: ['db-disk'] }]
    attributes?: Record<string, string | number | boolean>

    Anything else the reader should hear about the node, announced as key, value clauses in declared order and tabulated in the description: a layer type, an output shape, a parameter count.