Table of Contents

Interface IMemoryBasedStrategy<T, TInput, TOutput>

Namespace
AiDotNet.ContinualLearning.Interfaces
Assembly
AiDotNet.dll

Extended strategy interface for strategies that store task examples.

public interface IMemoryBasedStrategy<T, TInput, TOutput> : IContinualLearningStrategy<T, TInput, TOutput>

Type Parameters

T

The numeric type used for calculations.

TInput

The input data type.

TOutput

The output data type.

Inherited Members

Properties

MaxExamples

Gets the maximum number of examples that can be stored.

int MaxExamples { get; }

Property Value

int

StoredExampleCount

Gets the number of examples stored in memory.

int StoredExampleCount { get; }

Property Value

int

Methods

ClearMemory()

Clears all stored examples.

void ClearMemory()

SampleExamples(int)

Samples a batch of stored examples for replay.

IReadOnlyList<(TInput Input, TOutput Output, int TaskId)> SampleExamples(int batchSize)

Parameters

batchSize int

Number of examples to sample.

Returns

IReadOnlyList<(TInput Input, TOutput Output, int TaskId)>

List of input-output pairs.

StoreTaskExamples(IDataset<T, TInput, TOutput>)

Stores examples from a completed task.

void StoreTaskExamples(IDataset<T, TInput, TOutput> taskData)

Parameters

taskData IDataset<T, TInput, TOutput>

The task data to sample from.