Skip to content

XML documentation for DNN Image Featurizer Transfomer. #3456

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 22, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 18 additions & 4 deletions src/Microsoft.ML.OnnxTransformer/DnnImageFeaturizerTransform.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,25 @@ internal DnnImageFeaturizerInput(string outputColumnName, string inputColumnName
}

/// <summary>
/// The Dnn Image Featurizer is just a wrapper around two <see cref="OnnxScoringEstimator"/>s and three <see cref="ColumnCopyingEstimator"/>
/// The Dnn Image Featurizer is a wrapper around two <see cref="OnnxScoringEstimator"/> and three <see cref="ColumnCopyingEstimator"/>
/// 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.
/// </summary>
/// <remarks>
/// <format type="text/markdown"><![CDATA[
///
/// ### Estimator Characteristics
/// | | |
/// | -- | -- |
/// | Does this estimator need to look at the data to train its parameters? | No |
/// | Input column data type | Vector of <xref:System.Single> |
/// | Output column data type | Vector of <xref:System.Single>, the size of the vector depends on the pre-trained DNN |
///
/// ]]>
/// </format>
/// </remarks>
/// <seealso cref="OnnxCatalog.DnnFeaturizeImage(TransformsCatalog, string, Func{DnnImageFeaturizerInput, EstimatorChain{ColumnCopyingTransformer}}, string)"/>
public sealed class DnnImageFeaturizerEstimator : IEstimator<TransformerChain<ColumnCopyingTransformer>>
{
private readonly EstimatorChain<ColumnCopyingTransformer> _modelChain;
Expand All @@ -59,8 +73,8 @@ public sealed class DnnImageFeaturizerEstimator : IEstimator<TransformerChain<Co
/// included in a package together with that extension method. It also contains three <see cref="ColumnCopyingEstimator"/>s
/// to allow arbitrary column naming, as the ONNXEstimators require very specific naming based on the models.
/// For an example, see Microsoft.ML.DnnImageFeaturizer.ResNet18 </param>
/// <param name="outputColumnName">Name of the column resulting from the transformation of <paramref name="inputColumnName"/>.</param>
/// <param name="inputColumnName">Name of column to transform. If set to <see langword="null"/>, the value of the <paramref name="outputColumnName"/> will be used as source.</param>
/// <param name="outputColumnName">Name of the column resulting from the transformation of <paramref name="inputColumnName"/>. The column data is a known-sized vector of <see cref="System.Single"/>.</param>
/// <param name="inputColumnName">Name of column to transform. If set to <see langword="null"/>, the value of the <paramref name="outputColumnName"/> will be used as source. The column data must be a known-sized vector of <see cref="System.Single"/>.</param>
internal DnnImageFeaturizerEstimator(IHostEnvironment env, string outputColumnName, Func<DnnImageFeaturizerInput, EstimatorChain<ColumnCopyingTransformer>> modelFactory, string inputColumnName = null)
{
_modelChain = modelFactory(new DnnImageFeaturizerInput(outputColumnName, inputColumnName ?? outputColumnName, env, new DnnImageModelSelector()));
Expand Down
4 changes: 2 additions & 2 deletions src/Microsoft.ML.OnnxTransformer/OnnxCatalog.cs
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ public static OnnxScoringEstimator ApplyOnnxModel(this TransformsCatalog catalog
=> new OnnxScoringEstimator(CatalogUtils.GetEnvironment(catalog), outputColumnNames, inputColumnNames, modelFile, gpuDeviceId, fallbackToCpu);

/// <summary>
/// Creates a new instance of <see cref="DnnImageFeaturizerEstimator"/> which applies one of the pre-trained DNN models in
/// <see cref="DnnImageModelSelector"/>to featurize an image.
/// Create <see cref="DnnImageFeaturizerEstimator"/>, which applies one of the pre-trained DNN models in
/// <see cref="DnnImageModelSelector"/> to featurize an image.
/// </summary>
/// <param name="catalog">The transform's catalog.</param>
/// <param name="outputColumnName">The name of the column resulting from the transformation of <paramref name="inputColumnName"/>.</param>
Expand Down