(layers)
| 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) { |
no outgoing calls
no test coverage detected