Represents a neural network model composed of a sequence of layers.
addLayer(layer: Layer): void
Adds a layer to the model.
Configures the model for training.
fit(trainingData: number[][],trainingLabels: number[][],epochs: number,batchSize: number,debugEpochEnabled?: boolean,): Promise<void>
Trains the model for a fixed number of epochs (iterations on a dataset).
getConfig(): { layers: Array<{ name: string; config: Record<string, unknown>; }>; optimizer: Record<string, unknown>; lossFunction: Record<string, unknown>; metrics: string[]; }
Retrieves the configuration of the model.
getLayers(): Layer[]
Retrieves the layers of the model.
private
isTrainableLayer(layer: Layer): layer is TrainableLayer