Options
All
  • Public
  • Public/Protected
  • All
Menu

Class for the Graph Hierarchy for TensorFlow graph.

Hierarchy

  • HierarchyImpl

Implements

Index

Constructors

constructor

Properties

hasShapeInfo

hasShapeInfo: boolean = false

Private index

index: object

Type declaration

maxMetaEdgeSize

maxMetaEdgeSize: number = 1

orderings

orderings: object

Type declaration

  • [nodeName: string]: object
    • [childName: string]: number

root

root: Metanode

templates

templates: object

Type declaration

  • [templateId: string]: string[]

Methods

getBridgegraph

  • Given the name of a node in this hierarchy, get its bridgegraph, creating it on the fly if necessary. If the node is not a GroupNode, then this method returns null. If the provided name does not map to a node in the hierarchy, an error will be thrown.

    Parameters

    • nodeName: string

    Returns Graph<GroupNode | OpNode, Metaedge>

getChildName

  • getChildName(nodeName: string, descendantName: string): string
  • Utility function for determining the name of the immediate child under a node for a given descendant path. If the descendant corresponds to no immediate child, an error is thrown.

    Parameters

    • nodeName: string
    • descendantName: string

    Returns string

getNodeMap

  • getNodeMap(): object

getOneWayEdges

getPredecessors

  • getPredecessors(nodeName: string): Edges

getSuccessors

  • getSuccessors(nodeName: string): Edges
  • Given the name of a node, return its outgoing metaedges.

    This is the inverse of getPredecessors(). See that method's documentation for an in-depth example.

    Parameters

    • nodeName: string

    Returns Edges

getTemplateIndex

  • getTemplateIndex(): function
  • Returns a d3 Ordinal function that can be used to look up the index of a node based on its template id.

    Returns function

      • (string: any): number
      • Parameters

        • string: any

        Returns number

getTopologicalOrdering

  • getTopologicalOrdering(nodeName: string): object
  • For a given GroupNode, get or calculate an object which describes a topological ordering of child nodes within that GroupNode's metagraph.

    This ordering is used when rendering bridge control edges which are sometimes backwards relative to the dataflow.

    For example, say we have a graph with two edges A->B and A->C, and we're interested in the ordering under ROOT. In this case, any of the following would be legitimate return values:

    • { 'A': 0, 'B': 1, 'C': 2 } -- most likely
    • { 'A': 0, 'B': 2, 'C': 1 } -- less likely
    • { 'A': 12, 'B': 100, 'C': 99 } -- unlikely, but still OK

    The algorithm does not guarantee that all numbers from 0-N (where N is the number of nodes) appear exactly once. Rather it guarantees that if there is a path between two nodes, the earlier one will have a lower number in the ordering hash.

    When generating the ordering, we ignore control Metaedges (those which represent only BaseEdges that have isControlDependency set to true).

    If there is no node with the specified name, an error is thrown. If the node with the specified name is not a group node, null is returned.

    Parameters

    • nodeName: string

    Returns object

    • [childName: string]: number

node

setNode

Generated using TypeDoc