We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d6740bb commit b7a4079Copy full SHA for b7a4079
Quantize.c
@@ -15,7 +15,7 @@ static inline void QuantCluster_Train(struct QuantCluster_t *Dst, const struct B
15
struct BGRAf_t Dist = BGRAf_Sub(Data, &Dst->Centroid);
16
17
float DistW = BGRAf_Len2(&Dist);
18
- float TrainW = DistW; //! <- This will help outliers pop out more often
+ float TrainW = 0.001f + DistW; //! <- This will help outliers pop out more often (must not be 0.0!)
19
struct BGRAf_t TrainData = BGRAf_Muli( Data, TrainW);
20
struct BGRAf_t DistData = BGRAf_Muli(&Dist, DistW);
21
Dst->TrainWeight += TrainW, Dst->Train = BGRAf_Add(&Dst->Train, &TrainData);
0 commit comments