MCPcopy Create free account
hub / github.com/DFin/Neural-Network-Visualisation / createOutputLabels

Method createOutputLabels

assets/main.js:2572–2584  ·  view source on GitHub ↗
(positions)

Source from the content-addressed store, hash-verified

2570 }
2571
2572 createOutputLabels(positions) {
2573 if (!this.labelGroup) return;
2574 const offset = this.options.outputLabelOffset ?? 0.65;
2575 const scale = this.options.outputLabelScale ?? 0.48;
2576 positions.forEach((position, index) => {
2577 const label = this.buildDigitSprite(String(index));
2578 label.position.copy(position);
2579 label.position.x += offset;
2580 label.scale.set(scale, scale, scale);
2581 this.labelGroup.add(label);
2582 this.outputLabels.push(label);
2583 });
2584 }
2585
2586 buildDigitSprite(text) {
2587 const size = 128;

Callers 1

buildLayersMethod · 0.95

Calls 1

buildDigitSpriteMethod · 0.95

Tested by

no test coverage detected