14 writes to Weights
Microsoft.ML.StandardTrainers (14)
Standard\Online\AveragedLinear.cs (5)
167
VBufferUtils.Densify(ref
Weights
);
174
VBufferUtils.Densify(ref
Weights
);
215
VectorUtils.ScaleInto(in TotalWeights, 1 / (float)NumWeightUpdates, ref
Weights
);
255
VectorUtils.AddMult(in feat, biasUpdate / WeightsScale, ref
Weights
);
274
VectorUtils.ScaleInto(in TotalWeights, 1 / (float)NumWeightUpdates, ref
Weights
);
Standard\Online\LinearSvm.cs (2)
165
VBufferUtils.Densify(ref
Weights
);
251
VectorUtils.AddMult(in weightsUpdate, rate * weightsUpdateScale / (_numBatchExamples * WeightsScale), ref
Weights
);
Standard\Online\OnlineLinear.cs (7)
142
((IHaveFeatureWeights)predictor).GetFeatureWeights(ref
Weights
);
143
VBufferUtils.Densify(ref
Weights
);
160
Weights
= new VBuffer<float>(numFeatures, weightValues);
168
Weights
= new VBuffer<float>(numFeatures, weightValues);
172
Weights
= VBufferUtils.CreateDense<float>(numFeatures);
174
Weights
= VBufferUtils.CreateEmpty<float>(numFeatures);
185
VectorUtils.ScaleBy(ref
Weights
, WeightsScale);
15 references to Weights
Microsoft.ML.StandardTrainers (15)
Standard\Online\AveragedLinear.cs (5)
168
Weights
.CopyTo(ref TotalWeights);
203
VectorUtils.AddMult(in
Weights
, NumNoUpdates * WeightsScale, ref TotalWeights);
240
VectorUtils.AddMult(in
Weights
, NumNoUpdates * WeightsScale, ref TotalWeights);
288
VectorUtils.AddMult(in
Weights
, WeightsScale, ref TotalWeights);
293
VectorUtils.AddMult(in
Weights
, Gain * WeightsScale, ref TotalWeights);
Standard\Online\AveragedPerceptron.cs (1)
139
Weights
.CopyTo(ref weights);
Standard\Online\LinearSvm.cs (3)
260
float normalizer = 1 / (MathUtils.Sqrt(_lambda) * VectorUtils.Norm(
Weights
) * Math.Abs(WeightsScale));
275
=> Bias + VectorUtils.DotProduct(in feat, in
Weights
) * WeightsScale;
281
return new LinearBinaryModelParameters(ParentHost,
Weights
, Bias);
Standard\Online\OnlineGradientDescent.cs (1)
116
Weights
.CopyTo(ref weights);
Standard\Online\OnlineLinear.cs (5)
114
/// The implicit scaling factor for <see cref="
Weights
"/>. Note that this does not affect <see cref="Bias"/>.
179
/// Propagates the <see cref="WeightsScale"/> to the <see cref="
Weights
"/> vector.
191
/// Conditionally propagates the <see cref="WeightsScale"/> to the <see cref="
Weights
"/> vector
239
=> Bias + VectorUtils.DotProduct(in feat, in
Weights
) * WeightsScale;
300
float maxNorm = Math.Max(VectorUtils.MaxNorm(in state.
Weights
), Math.Abs(state.Bias));