Options
All
  • Public
  • Public/Protected
  • All
Menu

Module render

Package for the Render Hierarchy for TensorFlow graph.

Index

Type aliases

Point

Point: object

Type declaration

  • x: number
  • y: number

Functions

addInAnnotation

addOutAnnotation

createShortcut

extractHighDegrees

  • Remove edges and add to annotation instead.

    For root node, consider predefined types for source and sink. We do not extract predefined type from non-root so that Variables and the sgd node (op type = 'NoOp') do not get extract from inside own group.

    The order of extraction is important here as swapping the order can totally screw up the graph layout.

    Parameters

    Returns void

extractHighInOrOutDegree

extractPredefinedSink

extractPredefinedSource

  • extractPredefinedSource(renderNode: any): void
  • Remove edges from pre-defined in-extract patterns

    Parameters

    • renderNode: any

    Returns void

extractSpecifiedNodes

hasTypeIn

  • hasTypeIn(node: Node, types: string[]): boolean
  • Check whether the node's type is a member of the given list of types.

    Parameters

    • node: Node

      Node.

    • types: string[]

      List of type to match.

    Returns boolean

makeInExtract

  • Remove edges from a node, set its isInExtract property to true, and remove the node and move it to isolatedInExtract.

    If detachAllEdgesForHighDegree or forceDetach is true, extract all of its edges. Otherwise, only remove all out-edges.

    Parameters

    Returns void

makeOutExtract

  • Remove edges from a node, and set its isOutExtract property to true, and remove the node and move it to isolatedOutExtract.

    If detachAllEdgesForHighDegree or forceDetach is true, extract all of its edges. Otherwise, only extract all in-edges.

    Parameters

    Returns void

mapIndexToHue

  • mapIndexToHue(id: number): number
  • Given an integer, picks a hue that is far apart from other colors. The formula for picking color that avoid collision is: hue = (color range golden ratio index) % color range

    Parameters

    • id: number

    Returns number

removeControlEdges

setGraphDepth

setGroupNodeDepth

Object literals

MetanodeColors

MetanodeColors: object

Color parameters for node encoding.

type

{Object}

DEFAULT_FILL

DEFAULT_FILL: string = "#d9d9d9"

Default fill and stroke to use when no other information is available.

DEFAULT_STROKE

DEFAULT_STROKE: string = "#a6a6a6"

EXPANDED_COLOR

EXPANDED_COLOR: string = "#f0f0f0"

Neutral color to use when the node is expanded.

GRADIENT_OUTLINE

GRADIENT_OUTLINE: string = "#888"

HUES

HUES: Array<number> = [220, 100, 180, 40, 20, 340, 260, 300, 140, 60]

Standard hue values for node color palette.

LIGHTNESS

LIGHTNESS: number = 0.85

SATURATION

SATURATION: number = 0.6

UNKNOWN

UNKNOWN: string = "#eee"

STRUCTURE_PALETTE

  • STRUCTURE_PALETTE(id: number, lightened?: boolean): any
  • Parameters

    • id: number
    • Optional lightened: boolean

    Returns any

OpNodeColors

OpNodeColors: object

Color parameters for op nodes.

DEFAULT_FILL

DEFAULT_FILL: string = "white"

DEFAULT_STROKE

DEFAULT_STROKE: string = "#b2b2b2"

PARAMS

PARAMS: object

Parameters that affect how the graph is rendered on the screen.

detachAllEdgesForHighDegree

detachAllEdgesForHighDegree: boolean = true

When removing edges from a high degree node, remove all of its edges if detachAllEdgesForHighDegree is true. Otherwise remove all in-edges if the node has high in-degree, or all out-edges if the node has high out-degree.

enableBridgegraph

enableBridgegraph: boolean = true

Whether to add bridge nodes and edges to the core when building the subhierarchy of an expanded metanode. See buildSubhierarchy().

enableExtraction

enableExtraction: boolean = true

Whether to extract high degree nodes from the core part of the graph.

extractIsolatedNodesWithAnnotationsOnOneSide

extractIsolatedNodesWithAnnotationsOnOneSide: boolean = true

After extracting high in/out degree nodes and predefined source-like/sink-like, extract isolated nodes to the side if this extractIsolatedNodesWithAnnotationsOnOneSide is true.

inExtractTypes

inExtractTypes: Array<undefined> = []

Types patterns for predefined in-extract nodes, which are source-like nodes that will be extracted from the main graph.

maxAnnotations

maxAnnotations: number = 5

Maximum number of annotations to be displayed on a node before an ellipsis is used.

maxBridgePathDegree

maxBridgePathDegree: number = 4

Maximum in (for outbound bridge paths) or out (for inbound bridge paths) degree of a node allowed for a bridge path to be rendered to it from a subhierarchy of nodes. Having a max prevents having too many nodes emanate from a subhierarchy and crowding up.

maxControlDegree

maxControlDegree: number = 4

Maximum number of control edges a node can have before they aren't displayed.

minDegreeForExtraction

minDegreeForExtraction: number = 5

The minimum in or out degree a node must have in order to be possibly extracted.

minMaxColors

minMaxColors: Array<string> = ['#fff5f0', '#fb6a4a']

2 colors, for the minimum and maximum value respectively, whenever we have a gradient scale.

minNodeCountForExtraction

minNodeCountForExtraction: number = 15

The minimum number of nodes for a graph to have in order for high in and out degree nodes to be extracted in auxiliary. The aim here is to prevent nodes from being extracted from small graphs.

outExtractTypes

outExtractTypes: Array<string> = ['NoOp' // NoOps are sink-like used for managing control dependencies.]

Types patterns for predefined out-extract nodes, which are sink-like nodes that will be extracted from the main graph.

SeriesNodeColors

SeriesNodeColors: object

Color parameters for op nodes.

DEFAULT_FILL

DEFAULT_FILL: string = "white"

DEFAULT_STROKE

DEFAULT_STROKE: string = "#b2b2b2"

Generated using TypeDoc