Interface IDistillationStrategy<T, TInput, TOutput>
- Namespace
- AiDotNet.ContinualLearning.Interfaces
- Assembly
- AiDotNet.dll
Extended strategy interface for knowledge distillation-based strategies.
public interface IDistillationStrategy<T, TInput, TOutput> : IContinualLearningStrategy<T, TInput, TOutput>
Type Parameters
TThe numeric type used for calculations.
TInputThe input data type.
TOutputThe output data type.
- Inherited Members
Properties
DistillationWeight
Gets the weight for distillation loss vs task loss.
T DistillationWeight { get; }
Property Value
- T
TeacherModel
Gets the teacher model (frozen copy from before current task).
IFullModel<T, TInput, TOutput>? TeacherModel { get; }
Property Value
- IFullModel<T, TInput, TOutput>
Temperature
Gets the distillation temperature.
T Temperature { get; }
Property Value
- T
Methods
ComputeDistillationLoss(TOutput, TOutput)
Computes the distillation loss between teacher and student outputs.
T ComputeDistillationLoss(TOutput teacherOutput, TOutput studentOutput)
Parameters
teacherOutputTOutputOutput from the teacher model.
studentOutputTOutputOutput from the current student model.
Returns
- T
The distillation loss.