(definition)
| 1270 | |
| 1271 | class FeedForwardModel { |
| 1272 | constructor(definition) { |
| 1273 | if (!definition.layers?.length) { |
| 1274 | throw new Error("Die Netzwerkdefinition muss Schichten enthalten."); |
| 1275 | } |
| 1276 | this.normalization = definition.normalization ?? { mean: 0, std: 1 }; |
| 1277 | this.architecture = Array.isArray(definition.architecture) |
| 1278 | ? definition.architecture.slice() |
| 1279 | : this.computeArchitecture(definition.layers); |
| 1280 | this.layers = definition.layers.map((layer, index) => this.normaliseLayer(layer, index)); |
| 1281 | } |
| 1282 | |
| 1283 | computeArchitecture(layers) { |
| 1284 | if (!layers.length) return []; |
nothing calls this directly
no test coverage detected