SinkhornKnoppCentering<T>
Models & Types · AiDotNet.ComputerVision.Segmentation.PointCloud
Sinkhorn-Knopp centering (Caron et al. 2020; Sonata sinkhorn_knopp): alternately normalises
the prototypes and the samples of exp(scores / temperature) so every prototype receives the
same total mass and every sample’s row is a distribution.
Implements: ISonataTargetCentering<T>
How It Works
Runs in single precision regardless of T, as Sonata does
(feat = feat.float()): exp(1 / 0.04) is beyond half precision. The iteration runs in
log space: each normalisation is a log-softmax along its axis minus the log of the axis’ target
mass, and the result is exponentiated once at the end. That is algebraically Sonata’s linear
update, but a prototype whose every exp(score / temperature) underflows to zero no longer
divides 0 by 0 into NaN. The result carries no gradient: it is the teacher’s target.
Constructors
| Constructor | Summary |
|---|---|
SinkhornKnoppCentering(int iterations) |
Creates the centering with the given number of iterations. |
Properties
| Property | Summary |
|---|---|
int Iterations { get; } |
The number of row/column normalisation rounds. |
Methods
| Method | Summary |
|---|---|
Tensor<T> Center(Tensor<T> teacherScores, double temperature) |