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

Function normaliseShape

assets/main.js:762–766  ·  view source on GitHub ↗
(shape, fallback = [])

Source from the content-addressed store, hash-verified

760}
761
762function normaliseShape(shape, fallback = []) {
763 const source = Array.isArray(shape) ? shape : fallback;
764 if (!Array.isArray(source)) return [];
765 return source.map((value) => Number(value) || 0);
766}
767
768function normaliseLayerMetadata(layer, index) {
769 const layerIndex = Number.isFinite(layer?.layer_index) ? Number(layer.layer_index) : index;

Callers 2

normaliseLayerMetadataFunction · 0.85
decodeSnapshotLayersFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected