Skip to content

Commit 4f4c8c9

Browse files
committed
format changes
1 parent fcca204 commit 4f4c8c9

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

src/Microsoft.ML.Transforms/Text/StopWordsRemovingTransformer.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1145,8 +1145,8 @@ public void SaveAsOnnx(OnnxContext ctx)
11451145
}
11461146
}
11471147

1148-
// Note: Since StringNormalizer only accepts inputs of [C] or [1,C], we squeeze the batch dimension which
1149-
// may exceed 1
1148+
// Note: Since StringNormalizer only accepts inputs of shape [C] or [1,C], we temporarily squeeze the
1149+
// batch dimension which may exceed 1
11501150
private void SaveAsOnnxCore(OnnxContext ctx, int iinfo, string srcVariableName, string dstVariableName)
11511151
{
11521152
var opType = "Squeeze";

test/Microsoft.ML.Tests/OnnxConversionTest.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1335,10 +1335,9 @@ public void CustomStopWordsRemovingEstimatorOnnxTest()
13351335
new TextData(){ Text = "mat not fit cat" },
13361336
new TextData(){ Text = "a cat think mat bad" },
13371337
};
1338-
13391338
var dataView = mlContext.Data.LoadFromEnumerable(samples);
1340-
13411339
var onnxFileName = $"CustomStopWordsRemovingEstimator.onnx";
1340+
13421341
TestPipeline(pipeline, dataView, onnxFileName, new ColumnComparison[] { new ColumnComparison("WordsWithoutStopWords")});
13431342

13441343
Done();
@@ -1360,9 +1359,7 @@ public void StopWordsRemovingEstimatorOnnxTest()
13601359
new TextData(){ Text = "a mat not fit go cat" },
13611360
new TextData(){ Text = "cat think mat bad a" },
13621361
};
1363-
13641362
var dataView = mlContext.Data.LoadFromEnumerable(samples);
1365-
13661363
var onnxFileName = $"StopWordsRemovingEstimator.onnx";
13671364

13681365
TestPipeline(pipeline, dataView, onnxFileName, new ColumnComparison[] { new ColumnComparison("WordsWithoutStopWords") });

0 commit comments

Comments
 (0)