Class SSLResult<T>
- Namespace
- AiDotNet.SelfSupervisedLearning
- Assembly
- AiDotNet.dll
Result from SSL pretraining containing the trained encoder and metrics.
public class SSLResult<T>
Type Parameters
TThe numeric type used for computations.
- Inheritance
-
SSLResult<T>
- Inherited Members
Remarks
For Beginners: After SSL pretraining, this result object contains everything you need: the trained encoder, training history, and evaluation metrics. You can use the encoder for downstream tasks or continue training.
Properties
BestEpoch
Gets the epoch at which the best validation metric was achieved.
public int BestEpoch { get; set; }
Property Value
BestValidationMetric
Gets the best validation metric achieved during training.
public T? BestValidationMetric { get; set; }
Property Value
- T
CheckpointPath
Gets or sets the path to saved checkpoint (if saved).
public string? CheckpointPath { get; set; }
Property Value
Config
Gets or sets the training configuration used.
public SSLConfig? Config { get; set; }
Property Value
Encoder
Gets or sets the pretrained encoder network.
public INeuralNetwork<T>? Encoder { get; set; }
Property Value
Remarks
This is the main output of SSL pretraining. Use this encoder's representations for downstream tasks like classification, detection, or segmentation.
EpochsTrained
Gets or sets the number of epochs trained.
public int EpochsTrained { get; set; }
Property Value
ErrorMessage
Gets or sets any error message if training failed.
public string? ErrorMessage { get; set; }
Property Value
FinalMetrics
Gets or sets the final SSL metrics.
public SSLMetricReport<T>? FinalMetrics { get; set; }
Property Value
History
Gets or sets the training history.
public SSLTrainingHistory<T>? History { get; set; }
Property Value
IsSuccess
Gets or sets whether training was successful.
public bool IsSuccess { get; set; }
Property Value
KNNAccuracy
Gets or sets the k-NN evaluation accuracy (if performed).
public double? KNNAccuracy { get; set; }
Property Value
LinearEvaluation
Gets or sets the linear evaluation result (if performed).
public LinearEvalResult<T>? LinearEvaluation { get; set; }
Property Value
Method
Gets or sets the SSL method that was used for training.
public SSLMethodType Method { get; set; }
Property Value
TrainingTimeSeconds
Gets or sets the total training time in seconds.
public double TrainingTimeSeconds { get; set; }
Property Value
Methods
Failure(string)
Creates a failed SSL result.
public static SSLResult<T> Failure(string errorMessage)
Parameters
errorMessagestring
Returns
- SSLResult<T>
Success(INeuralNetwork<T>, SSLMethodType, SSLConfig, SSLTrainingHistory<T>)
Creates a successful SSL result.
public static SSLResult<T> Success(INeuralNetwork<T> encoder, SSLMethodType method, SSLConfig config, SSLTrainingHistory<T> history)
Parameters
encoderINeuralNetwork<T>methodSSLMethodTypeconfigSSLConfighistorySSLTrainingHistory<T>
Returns
- SSLResult<T>