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

Method computeArchitecture

assets/main.js:1283–1292  ·  view source on GitHub ↗
(layers)

Source from the content-addressed store, hash-verified

1281 }
1282
1283 computeArchitecture(layers) {
1284 if (!layers.length) return [];
1285 const architecture = [];
1286 const firstLayer = layers[0];
1287 architecture.push(firstLayer.weights[0]?.length ?? 0);
1288 for (const layer of layers) {
1289 architecture.push(layer.biases.length);
1290 }
1291 return architecture;
1292 }
1293
1294 normaliseLayer(layer, index) {
1295 if (!layer || !Array.isArray(layer.weights) || layer.weights.length === 0) {

Callers 2

constructorMethod · 0.95
updateLayersMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected