Skip to content

Commit 44c5306

Browse files
committed
resolving formatting
1 parent b85a6e4 commit 44c5306

File tree

2 files changed

+7
-9
lines changed

2 files changed

+7
-9
lines changed

src/Microsoft.ML.Mkl.Components/VectorWhitening.cs

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
// See the LICENSE file in the project root for more information.
44

55
using System;
6-
using System.Collections.Generic;
76
using System.Linq;
87
using System.Runtime.InteropServices;
98
using System.Security;
@@ -620,12 +619,13 @@ protected override Delegate MakeGetter(DataViewRow input, int iinfo, Func<int, b
620619
};
621620
return del;
622621
}
622+
623623
public bool CanSaveOnnx(OnnxContext ctx) => true;
624624

625625
public void SaveAsOnnx(OnnxContext ctx)
626626
{
627627
Host.CheckValue(ctx, nameof(ctx));
628-
int numColumns = _parent.ColumnPairs.Length; //why are the multiple columns
628+
int numColumns = _parent.ColumnPairs.Length;
629629
for (int iinfo = 0; iinfo < numColumns; ++iinfo)
630630
{
631631
string inputColumnName = _parent.ColumnPairs[iinfo].inputColumnName;
@@ -637,8 +637,8 @@ public void SaveAsOnnx(OnnxContext ctx)
637637
string dstVariableName = ctx.AddIntermediateVariable(_srcTypes[iinfo], outputColumnName, true);
638638
SaveAsOnnxCore(ctx, iinfo, srcVariableName, dstVariableName);
639639
}
640-
641640
}
641+
642642
private void SaveAsOnnxCore(OnnxContext ctx, int iinfo, string srcVariableName, string dstVariableName)
643643
{
644644
var model = _parent._models[iinfo];
@@ -658,18 +658,17 @@ private void SaveAsOnnxCore(OnnxContext ctx, int iinfo, string srcVariableName,
658658
{
659659
if (i >= dimension)
660660
break;
661-
Array.Copy(model, i*dimension, principalComponents, i*dimension, dimension);
661+
Array.Copy(model, i * dimension, principalComponents, i * dimension, dimension);
662662
}
663663
model = principalComponents;
664664
}
665665

666666
var opType = "Gemm";
667-
var modelName = ctx.AddInitializer(model, modelDimension ,"model");
668-
var zeroValueName = ctx.AddInitializer((float) 0);
667+
var modelName = ctx.AddInitializer(model, modelDimension, "model");
668+
var zeroValueName = ctx.AddInitializer((float)0);
669669

670670
var node = ctx.CreateNode(opType, new[] { modelName, srcVariableName, zeroValueName }, new[] { dstVariableName }, ctx.GetNodeName(opType), "");
671-
node.AddAttribute("transB",1);
672-
671+
node.AddAttribute("transB", 1);
673672
}
674673

675674
private ValueGetter<T> GetSrcGetter<T>(DataViewRow input, int iinfo)

test/Microsoft.ML.Tests/OnnxConversionTest.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
using Newtonsoft.Json;
2727
using Xunit;
2828
using Xunit.Abstractions;
29-
using System.Diagnostics;
3029
using static Microsoft.ML.Model.OnnxConverter.OnnxCSharpToProtoWrapper;
3130

3231
#pragma warning disable CS0649 // Field 'fieldName' is never assigned to, and will always have its default value null

0 commit comments

Comments
 (0)