Table of Contents

Class BaseModel<TInputData, TPrediction>

Namespace
NeuralNetworks.Models
Assembly
NeuralNetworks.dll
public abstract class BaseModel<TInputData, TPrediction> : Model<TInputData, TPrediction> where TInputData : notnull where TPrediction : notnull

Type Parameters

TInputData
TPrediction
Inheritance
Model<TInputData, TPrediction>
BaseModel<TInputData, TPrediction>
Inherited Members

Constructors

BaseModel(SeededRandom)

public BaseModel(SeededRandom random)

Parameters

random SeededRandom

BaseModel(Loss<TPrediction>?, SeededRandom?, string?)

public BaseModel(Loss<TPrediction>? defaultLossFunction = null, SeededRandom? random = null, string? modelFilePath = null)

Parameters

defaultLossFunction Loss<TPrediction>
random SeededRandom
modelFilePath string

BaseModel(string?)

Load model parameters from a file. The file should contain the parameters of the model in a format compatible with the model's architecture. This constructor allows initializing the model with pre-trained parameters, enabling tasks such as inference or fine-tuning on new data.

public BaseModel(string? modelFilePath)

Parameters

modelFilePath string

Methods

AddLayer<TLayerOut>(Layer<TInputData, TLayerOut>)

protected static LayerListBuilder<TInputData, TLayerOut> AddLayer<TLayerOut>(Layer<TInputData, TLayerOut> layer) where TLayerOut : notnull

Parameters

layer Layer<TInputData, TLayerOut>

Returns

LayerListBuilder<TInputData, TLayerOut>

Type Parameters

TLayerOut

CreateLayerListBuilder()

protected abstract LayerListBuilder<TInputData, TPrediction> CreateLayerListBuilder()

Returns

LayerListBuilder<TInputData, TPrediction>