FlowBasedDistillationStrategy<T>
Models & Types · AiDotNet.KnowledgeDistillation.Strategies
Flow-based distillation that matches the information flow between layers.
Inheritance: DistillationStrategyBase<T> → FlowBasedDistillationStrategy<T>
Constructors
| Constructor | Summary |
|---|---|
FlowBasedDistillationStrategy(double flowWeight, double temperature, double alpha) |
Methods
| Method | Summary |
|---|---|
Matrix<T> ComputeGradient(Matrix<T> studentBatchOutput, Matrix<T> teacherBatchOutput, Matrix<T> trueLabelsBatch) |
|
T ComputeFlowLoss(Tensor<T>[] studentFeatures, Tensor<T>[] teacherFeatures) |
Computes the FSP (“flow of solution procedure”) loss from structured feature MAPS, which is the form the paper defines. |
T ComputeFlowLoss(Vector<T>[] studentFeatures, Vector<T>[] teacherFeatures) |
Computes the FSP (“flow of solution procedure”) loss from structured feature MAPS, which is the form the paper defines. |
T ComputeLoss(Matrix<T> studentBatchOutput, Matrix<T> teacherBatchOutput, Matrix<T> trueLabelsBatch) |