441 references to GetValues
Microsoft.Data.Analysis.Tests (5)
Microsoft.ML.Core (21)
Microsoft.ML.Core.Tests (62)
UnitTests\TestVBuffer.cs (52)
38Assert.Equal(4, buffer.GetValues().Length);
39Assert.Equal(1, buffer.GetValues()[2]);
101float infNorm = a.GetValues().Length == 0 ? 0 : a.Items().Max(iv => Math.Abs(iv.Value));
293var actualValues = a.GetValues().ToArray();
317Assert.Equal(values, a.GetValues().ToArray());
472TDst[] values = new TDst[a.GetValues().Length];
546if (a.GetValues().Length == 0 || c == 0)
554var editor = VBufferEditor.Create(ref aa, b.Length, aa.GetValues().Length, requireIndicesOnDense: true);
908while (index < a.GetValues().Length)
915expectedValues.Add(a.GetValues()[index]);
928Assert.True(expectedIndices.Count <= a.GetValues().Length);
1014var editor = VBufferEditor.Create(ref dst, src.Length, src.GetValues().Length);
1018src.GetValues().CopyTo(values);
1030Assert.Equal(expected.GetValues().Length, actual.GetValues().Length);
1037for (int i = 0; i < expected.GetValues().Length; ++i)
1039var result = equalityFunc(expected.GetValues()[i], actual.GetValues()[i]);
1040Assert.True(result, $"Value [{i}] mismatch on expected {expected.GetValues()[i]} vs. actual {actual.GetValues()[i]}");
1118GenerateVBuffer(rgen, len, a.GetValues().Length, out b);
1127GenerateVBuffer(rgen, a.GetValues().Length, rgen.Next(a.GetValues().Length), out b);
1128bEditor = VBufferEditor.Create(ref b, len, b.GetValues().Length);
1141int boundary = rgen.Next(a.GetValues().Length + 1);
1142GenerateVBuffer(rgen, len, a.GetValues().Length - boundary, out b);
1143if (a.GetValues().Length != 0 && b.GetValues().Length != 0 && a.GetValues().Length != b.GetValues().Length)
1183Assert.True(equalityFunc(expected.GetValues()[i], actual.GetValues()[i]));
1189int j = actual.GetValues().Length == 0 ? length : actual.GetIndices()[jj];
1194Assert.True(equalityFunc(expected.GetValues()[i], actual.GetValues()[jj]));
1195j = ++jj == actual.GetValues().Length ? length : actual.GetIndices()[jj];
1198Assert.True(equalityFunc(expected.GetValues()[i], default(T)));
1205int i = expected.GetValues().Length == 0 ? length : expected.GetIndices()[ii];
1210Assert.True(equalityFunc(expected.GetValues()[ii], actual.GetValues()[j]));
1211i = ++ii == expected.GetValues().Length ? length : expected.GetIndices()[ii];
1214Assert.True(equalityFunc(actual.GetValues()[j], default(T)));
1222int i = expected.GetValues().Length == 0 ? length : expected.GetIndices()[ii];
1223int j = actual.GetValues().Length == 0 ? length : actual.GetIndices()[jj];
1230Assert.True(equalityFunc(expected.GetValues()[ii], actual.GetValues()[jj]));
1231i = ++ii == expected.GetValues().Length ? length : expected.GetIndices()[ii];
1232j = ++jj == actual.GetValues().Length ? length : actual.GetIndices()[jj];
1236Assert.True(equalityFunc(expected.GetValues()[ii], default(T)));
1237i = ++ii == expected.GetValues().Length ? length : expected.GetIndices()[ii];
1242Assert.True(equalityFunc(actual.GetValues()[ii], default(T)));
1243j = ++jj == actual.GetValues().Length ? length : actual.GetIndices()[jj];
Microsoft.ML.Data (121)
Deprecated\Vector\VectorUtils.cs (21)
33var bValues = b.GetValues();
45var aValues = a.GetValues();
46var bValues = b.GetValues();
81var aValues = a.GetValues();
167CpuMathUtils.MulElementWise(a.GetValues(), dst.GetValues(), editor.Values, a.Length);
256var aValues = a.GetValues();
257var bValues = b.GetValues();
308var bValues = b.GetValues();
400return L2DiffSquaredDense(a.GetValues(), b.GetValues(), b.Length);
401return L2DistSquaredHalfSparse(a.GetValues(), b.GetValues(), b.GetIndices());
404return L2DistSquaredHalfSparse(b.GetValues(), a.GetValues(), a.GetIndices());
405return L2DistSquaredSparse(a.GetValues(), a.GetIndices(), b.GetValues(), b.GetIndices());
419return L2DiffSquaredDense(a, b.GetValues(), b.Length);
420return L2DistSquaredHalfSparse(a.AsSpan(0, a.Length), b.GetValues(), b.GetIndices());
446var srcValues = src.GetValues();
474var srcValues = src.GetValues();
Transforms\KeyToValue.cs (9)
340MapKey(in src, _values.GetValues(), ref dst);
389var srcValues = src.GetValues();
392var keyValues = _values.GetValues();
478var keyValues = _values.GetValues();
536string[] values = Array.ConvertAll<TValue, string>(_values.GetValues().ToArray(), item => Convert.ToString(item));
544float[] values = Array.ConvertAll<TValue, float>(_values.GetValues().ToArray(), item => Convert.ToSingle(item));
550float[] values = Array.ConvertAll<TValue, float>(_values.GetValues().ToArray(), item => Convert.ToSingle(item));
559string[] values = Array.ConvertAll<TValue, string>(_values.GetValues().ToArray(), item => Convert.ToString(item));
564float[] values = Array.ConvertAll<TValue, float>(_values.GetValues().ToArray(), item => Convert.ToSingle(item));
Microsoft.ML.DataView (6)
VBuffer.cs (6)
17/// <see cref="GetValues"/> and, if not dense, <see cref="GetIndices"/>.
54/// as returned from <see cref="GetValues"/>, since all values are explicitly represented in a dense representation. If
69/// For a sparse representation it is parallel to that returned from <see cref="GetValues"/> and specifies the
75/// To give one example, if <see cref="GetIndices"/> returns [3, 5] and <see cref="GetValues"/>() produces [98, 76],
367/// <see cref="GetValues"/> does is not a free operation, it may be more efficient to use this method. However
369/// <see cref="GetValues"/> and, if appropriate, <see cref="GetIndices"/> directly.
Microsoft.ML.Ensemble (1)
Microsoft.ML.EntryPoints (1)
Microsoft.ML.FastTree (14)
Microsoft.ML.ImageAnalytics (2)
Microsoft.ML.IntegrationTests (2)
Microsoft.ML.KMeansClustering (5)
Microsoft.ML.Mkl.Components (4)
Microsoft.ML.OnnxTransformer (2)
Microsoft.ML.OnnxTransformerTest (5)
Microsoft.ML.PCA (4)
Microsoft.ML.Predictor.Tests (1)
Microsoft.ML.Samples (13)
Microsoft.ML.StandardTrainers (32)
Microsoft.ML.TensorFlow.Tests (26)
TensorflowTests.cs (23)
210var cValues = c.GetValues();
220cValues = c.GetValues();
319var oneDimValues = oneDim.GetValues();
323var twoDimValues = twoDim.GetValues();
327var threeDimValues = threeDim.GetValues();
331var fourDimValues = fourDim.GetValues();
335var fourDimKnownValues = fourDimKnown.GetValues();
460var f64Values = f64.GetValues();
463var f32Values = f32.GetValues();
466var i64Values = i64.GetValues();
469var i32Values = i32.GetValues();
472var i16Values = i16.GetValues();
475var i8Values = i8.GetValues();
478var u64Values = u64.GetValues();
481var u32Values = u32.GetValues();
484var u16Values = u16.GetValues();
487var u8Values = u8.GetValues();
490var bValues = b.GetValues();
608Assert.Equal("conv2d/kernel", inputOps.GetValues()[0].ToString());
622Assert.Equal("reshape/Reshape", inputOps.GetValues()[0].ToString());
623Assert.Equal("conv2d/Conv2D/ReadVariableOp", inputOps.GetValues()[1].ToString());
637Assert.Equal("sequential/dense_1/BiasAdd", inputOps.GetValues()[0].ToString());
747Assert.NotEqual(trainedBias.GetValues().ToArray(), new float[] { 0.1f, 0.1f, 0.1f, 0.1f, 0.1f, 0.1f, 0.1f, 0.1f, 0.1f, 0.1f });
Microsoft.ML.TestFramework (8)
Microsoft.ML.TestFrameworkCommon (2)
Microsoft.ML.Tests (14)
Microsoft.ML.TimeSeries (6)
Microsoft.ML.TorchSharp (8)
Microsoft.ML.TorchSharp.Tests (2)
Microsoft.ML.Transforms (73)
Microsoft.ML.Vision (1)