From a17be90eb42f44e3fbec3ab1a75106aea13a7125 Mon Sep 17 00:00:00 2001 From: Zeeshan Siddiqui Date: Sun, 21 Apr 2019 20:46:41 -0700 Subject: [PATCH 1/2] XML documentation for DNN Image Featurizer Transfomer. --- .../DnnImageFeaturizerTransform.cs | 16 +++++++++++++++- src/Microsoft.ML.OnnxTransformer/OnnxCatalog.cs | 4 ++-- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/src/Microsoft.ML.OnnxTransformer/DnnImageFeaturizerTransform.cs b/src/Microsoft.ML.OnnxTransformer/DnnImageFeaturizerTransform.cs index 9c6b590984..33ea774d4e 100644 --- a/src/Microsoft.ML.OnnxTransformer/DnnImageFeaturizerTransform.cs +++ b/src/Microsoft.ML.OnnxTransformer/DnnImageFeaturizerTransform.cs @@ -41,11 +41,25 @@ internal DnnImageFeaturizerInput(string outputColumnName, string inputColumnName } /// - /// The Dnn Image Featurizer is just a wrapper around two s and three + /// The Dnn Image Featurizer is just a wrapper around two and three /// with present pretrained DNN models. The ColumnsCopying are there to allow arbitrary column input and output names, as by default /// the ONNXTransformer requires the names of the columns to be identical to the names of the ONNX model nodes. /// Note that because of this, it only works on Windows machines as that is a constraint of the OnnxTransformer. /// + /// + /// | + /// | Output column data type | | + /// + /// ]]> + /// + /// + /// public sealed class DnnImageFeaturizerEstimator : IEstimator> { private readonly EstimatorChain _modelChain; diff --git a/src/Microsoft.ML.OnnxTransformer/OnnxCatalog.cs b/src/Microsoft.ML.OnnxTransformer/OnnxCatalog.cs index 243fa6297f..546a5260b1 100644 --- a/src/Microsoft.ML.OnnxTransformer/OnnxCatalog.cs +++ b/src/Microsoft.ML.OnnxTransformer/OnnxCatalog.cs @@ -71,8 +71,8 @@ public static OnnxScoringEstimator ApplyOnnxModel(this TransformsCatalog catalog => new OnnxScoringEstimator(CatalogUtils.GetEnvironment(catalog), outputColumnNames, inputColumnNames, modelFile, gpuDeviceId, fallbackToCpu); /// - /// Creates a new instance of which applies one of the pre-trained DNN models in - /// to featurize an image. + /// Create , which applies one of the pre-trained DNN models in + /// to featurize an image. /// /// The transform's catalog. /// The name of the column resulting from the transformation of . From 716ce5befed3362e873a2c9ed75a69168d0b7b4b Mon Sep 17 00:00:00 2001 From: Zeeshan Siddiqui Date: Sun, 21 Apr 2019 21:20:15 -0700 Subject: [PATCH 2/2] PR feedback. --- .../DnnImageFeaturizerTransform.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Microsoft.ML.OnnxTransformer/DnnImageFeaturizerTransform.cs b/src/Microsoft.ML.OnnxTransformer/DnnImageFeaturizerTransform.cs index 33ea774d4e..8539ebc28c 100644 --- a/src/Microsoft.ML.OnnxTransformer/DnnImageFeaturizerTransform.cs +++ b/src/Microsoft.ML.OnnxTransformer/DnnImageFeaturizerTransform.cs @@ -41,10 +41,10 @@ internal DnnImageFeaturizerInput(string outputColumnName, string inputColumnName } /// - /// The Dnn Image Featurizer is just a wrapper around two and three + /// The Dnn Image Featurizer is a wrapper around two and three /// with present pretrained DNN models. The ColumnsCopying are there to allow arbitrary column input and output names, as by default /// the ONNXTransformer requires the names of the columns to be identical to the names of the ONNX model nodes. - /// Note that because of this, it only works on Windows machines as that is a constraint of the OnnxTransformer. + /// Note that because of this, it only works on Windows machines, as that is a constraint of the OnnxTransformer. /// /// /// | - /// | Output column data type | | + /// | Output column data type | Vector of , the size of the vector depends on the pre-trained DNN | /// /// ]]> /// @@ -73,8 +73,8 @@ public sealed class DnnImageFeaturizerEstimator : IEstimators /// to allow arbitrary column naming, as the ONNXEstimators require very specific naming based on the models. /// For an example, see Microsoft.ML.DnnImageFeaturizer.ResNet18 - /// Name of the column resulting from the transformation of . - /// Name of column to transform. If set to , the value of the will be used as source. + /// Name of the column resulting from the transformation of . The column data is a known-sized vector of . + /// Name of column to transform. If set to , the value of the will be used as source. The column data must be a known-sized vector of . internal DnnImageFeaturizerEstimator(IHostEnvironment env, string outputColumnName, Func> modelFactory, string inputColumnName = null) { _modelChain = modelFactory(new DnnImageFeaturizerInput(outputColumnName, inputColumnName ?? outputColumnName, env, new DnnImageModelSelector()));