MCPcopy
hub / github.com/tensorflow/playground / updateWeightsUI

Function updateWeightsUI

src/playground.ts:403–421  ·  view source on GitHub ↗
(network: nn.Node[][], container)

Source from the content-addressed store, hash-verified

401}
402
403function updateWeightsUI(network: nn.Node[][], container) {
404 for (let layerIdx = 1; layerIdx < network.length; layerIdx++) {
405 let currentLayer = network[layerIdx];
406 // Update all the nodes in this layer.
407 for (let i = 0; i < currentLayer.length; i++) {
408 let node = currentLayer[i];
409 for (let j = 0; j < node.inputLinks.length; j++) {
410 let link = node.inputLinks[j];
411 container.select(`#link${link.source.id}-${link.dest.id}`)
412 .style({
413 "stroke-dashoffset": -iter / 3,
414 "stroke-width": linkWidthScale(Math.abs(link.weight)),
415 "stroke": colorScale(link.weight)
416 })
417 .datum(link);
418 }
419 }
420 }
421}
422
423function drawNode(cx: number, cy: number, nodeId: string, isInput: boolean,
424 container, node?: nn.Node) {

Callers 1

updateUIFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…