MCPcopy Create free account
hub / github.com/tensorflow/tensorboard / addEdgeToGraph

Function addEdgeToGraph

tensorboard/plugins/graph/tf_graph_common/graph.ts:972–994  ·  view source on GitHub ↗
(
  graph: SlimGraph,
  inputName: string,
  outputNode: OpNode,
  input: NormalizedInput,
  params: BuildParams,
  index: number
)

Source from the content-addressed store, hash-verified

970 return normalizedInputs;
971}
972function addEdgeToGraph(
973 graph: SlimGraph,
974 inputName: string,
975 outputNode: OpNode,
976 input: NormalizedInput,
977 params: BuildParams,
978 index: number
979) {
980 // Don't allow loops in the graph.
981 if (inputName === outputNode.name) {
982 return;
983 }
984 // Check if this op type and input number corresponds to a
985 // reference edge using the refEdges dictionary in the params.
986 let isRefEdge = params.refEdges[outputNode.op + ' ' + index] === true;
987 graph.edges.push({
988 v: inputName,
989 w: outputNode.name,
990 outputTensorKey: input.outputTensorKey,
991 isControlDependency: input.isControlDependency,
992 isReferenceEdge: isRefEdge,
993 });
994}
995export const DefaultBuildParams: BuildParams = {
996 enableEmbedding: true,
997 inEmbeddingTypes: ['Const'],

Callers 1

buildFunction · 0.85

Calls 1

pushMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…