ISelfSupervisedLearningMethod<T>

Interfaces · AiDotNet.SelfSupervisedLearning

Defines the contract for self-supervised learning methods.

Known implementations: SelfSupervisedLearningMethodBase<T>

For Beginners

Self-supervised learning methods learn useful representations from unlabeled data. They create “pretext tasks” that provide supervision signals without human labels.

How It Works

Each SSL method implements this interface and provides:

Example usage:

Properties

Property Summary
SelfSupervisedLearningMethodCategory Category { get; } Gets the category of this SSL method.
bool RequiresMemoryBank { get; } Indicates whether this method requires a memory bank for negative samples.
bool UsesMomentumEncoder { get; } Indicates whether this method uses a momentum-updated encoder.
long ParameterCount { get; } Gets the total number of trainable parameters.
string Name { get; } Gets the name of this SSL method.

Methods

Method Summary
INeuralNetwork<T> GetEncoder() Gets the underlying encoder neural network.
SelfSupervisedLearningStepResult<T> TrainStep(Tensor<T> batch, SelfSupervisedLearningAugmentationContext<T> augmentationContext) Performs a single training step on a batch of data.
Tensor<T> Encode(Tensor<T> input) Encodes input data into learned representations.
Vector<T> GetParameters() Gets the current parameters of the SSL method for serialization.
void OnEpochEnd(int epochNumber) Called at the end of each training epoch.
void OnEpochStart(int epochNumber) Called at the start of each training epoch.
void Reset() Resets the SSL method to its initial state.
void SetParameters(Vector<T> parameters) Sets the parameters of the SSL method from a serialized vector.