14 writes to Weights
Microsoft.ML.StandardTrainers (14)
Standard\Online\AveragedLinear.cs (5)
163
VBufferUtils.Densify(ref
Weights
);
170
VBufferUtils.Densify(ref
Weights
);
211
VectorUtils.ScaleInto(in TotalWeights, 1 / (float)NumWeightUpdates, ref
Weights
);
251
VectorUtils.AddMult(in feat, biasUpdate / WeightsScale, ref
Weights
);
270
VectorUtils.ScaleInto(in TotalWeights, 1 / (float)NumWeightUpdates, ref
Weights
);
Standard\Online\LinearSvm.cs (2)
148
VBufferUtils.Densify(ref
Weights
);
234
VectorUtils.AddMult(in weightsUpdate, rate * weightsUpdateScale / (_numBatchExamples * WeightsScale), ref
Weights
);
Standard\Online\OnlineLinear.cs (7)
140
((IHaveFeatureWeights)predictor).GetFeatureWeights(ref
Weights
);
141
VBufferUtils.Densify(ref
Weights
);
158
Weights
= new VBuffer<float>(numFeatures, weightValues);
166
Weights
= new VBuffer<float>(numFeatures, weightValues);
170
Weights
= VBufferUtils.CreateDense<float>(numFeatures);
172
Weights
= VBufferUtils.CreateEmpty<float>(numFeatures);
183
VectorUtils.ScaleBy(ref
Weights
, WeightsScale);
15 references to Weights
Microsoft.ML.StandardTrainers (15)
Standard\Online\AveragedLinear.cs (5)
164
Weights
.CopyTo(ref TotalWeights);
199
VectorUtils.AddMult(in
Weights
, NumNoUpdates * WeightsScale, ref TotalWeights);
236
VectorUtils.AddMult(in
Weights
, NumNoUpdates * WeightsScale, ref TotalWeights);
284
VectorUtils.AddMult(in
Weights
, WeightsScale, ref TotalWeights);
289
VectorUtils.AddMult(in
Weights
, Gain * WeightsScale, ref TotalWeights);
Standard\Online\AveragedPerceptron.cs (1)
138
Weights
.CopyTo(ref weights);
Standard\Online\LinearSvm.cs (3)
243
float normalizer = 1 / (MathUtils.Sqrt(_lambda) * VectorUtils.Norm(
Weights
) * Math.Abs(WeightsScale));
258
=> Bias + VectorUtils.DotProduct(in feat, in
Weights
) * WeightsScale;
264
return new LinearBinaryModelParameters(ParentHost,
Weights
, Bias);
Standard\Online\OnlineGradientDescent.cs (1)
115
Weights
.CopyTo(ref weights);
Standard\Online\OnlineLinear.cs (5)
112
/// The implicit scaling factor for <see cref="
Weights
"/>. Note that this does not affect <see cref="Bias"/>.
177
/// Propagates the <see cref="WeightsScale"/> to the <see cref="
Weights
"/> vector.
189
/// Conditionally propagates the <see cref="WeightsScale"/> to the <see cref="
Weights
"/> vector
237
=> Bias + VectorUtils.DotProduct(in feat, in
Weights
) * WeightsScale;
298
float maxNorm = Math.Max(VectorUtils.MaxNorm(in state.
Weights
), Math.Abs(state.Bias));