Skip to content

Commit 17796fa

Browse files
committed
Minor polishment
1 parent 28b2f11 commit 17796fa

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

src/Microsoft.ML.DnnImageFeaturizer.ResNet18/ResNet18Extension.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ public static EstimatorChain<ColumnCopyingTransformer> ResNet18(this DnnImageMod
3030

3131
/// <summary>
3232
/// This allows a custom model location to be specified. This is useful is a custom model is specified,
33-
/// or if the model is desired to be placed or shipped separately in a different folder from the main application. Note that because Onnx models
34-
/// must be in a directory all by themsleves for the OnnxTransformer to work, this method appends a ResNet18Onnx/ResNetPrepOnnx subdirectory
33+
/// or if the model is desired to be placed or shipped separately in a different folder from the main application. Note that because ONNX models
34+
/// must be in a directory all by themselves for the OnnxTransformer to work, this method appends a ResNet18Onnx/ResNetPrepOnnx subdirectory
3535
/// to the passed in directory to prevent having to make that directory manually each time.
3636
/// </summary>
3737
public static EstimatorChain<ColumnCopyingTransformer> ResNet18(this DnnImageModelSelector dnnModelContext, IHostEnvironment env, string outputColumnName, string inputColumnName, string modelDir)

src/Microsoft.ML.OnnxTransformer/OnnxTransform.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ namespace Microsoft.ML.Transforms.Onnx
4646
/// | Output column data type | The same data type as the input column |
4747
/// | Required NuGet in addition to Microsoft.ML | Microsoft.ML.OnnxTransformer |
4848
///
49-
/// Supports inferencing of models in ONNX 1.2 and 1.3 format (opset 7, 8 and 9), using the
49+
/// Supports inferencing of models in ONNX 1.2, 1.3, 1.4, and 1.5 format (opset 7, 8, 9, and 10), using the
5050
/// [Microsoft.ML.OnnxRuntime](https://www.nuget.org/packages/Microsoft.ML.OnnxRuntime/) library.
5151
/// Models are scored on CPU by default. If GPU execution is needed (optional), use the
5252
/// NuGet package available at [Microsoft.ML.OnnxRuntime.Gpu](https://www.nuget.org/packages/Microsoft.ML.OnnxRuntime.Gpu/)

src/Microsoft.ML.OnnxTransformer/OnnxUtils.cs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@ internal sealed class OnnxModel
2929
/// </summary>
3030
public sealed class OnnxModelInfo
3131
{
32-
public readonly OnnxNodeInfo[] InputsInfo;
33-
public readonly OnnxNodeInfo[] OutputsInfo;
32+
public readonly OnnxVariableInfo[] InputsInfo;
33+
public readonly OnnxVariableInfo[] OutputsInfo;
3434

35-
public OnnxModelInfo(IEnumerable<OnnxNodeInfo> inputsInfo, IEnumerable<OnnxNodeInfo> outputsInfo)
35+
public OnnxModelInfo(IEnumerable<OnnxVariableInfo> inputsInfo, IEnumerable<OnnxVariableInfo> outputsInfo)
3636
{
3737
InputsInfo = inputsInfo.ToArray();
3838
OutputsInfo = outputsInfo.ToArray();
@@ -43,7 +43,7 @@ public OnnxModelInfo(IEnumerable<OnnxNodeInfo> inputsInfo, IEnumerable<OnnxNodeI
4343
/// OnnxNodeInfo contains all the information for a given node (e.g. inputs/outputs)
4444
/// of an Onnx model.
4545
/// </summary>
46-
public class OnnxNodeInfo
46+
public class OnnxVariableInfo
4747
{
4848
/// <summary>
4949
/// The Name of the node
@@ -58,7 +58,7 @@ public class OnnxNodeInfo
5858
/// </summary>
5959
public readonly System.Type Type;
6060

61-
public OnnxNodeInfo(string name, OnnxShape shape, System.Type type)
61+
public OnnxVariableInfo(string name, OnnxShape shape, System.Type type)
6262
{
6363
Name = name;
6464
Shape = shape;
@@ -163,18 +163,18 @@ public byte[] ToByteArray()
163163
/// Returns input metadata of the ONNX model.
164164
/// </summary>
165165
/// <returns>OnnxNodeInfo[]</returns>
166-
private IEnumerable<OnnxNodeInfo> GetInputsInfo()
166+
private IEnumerable<OnnxVariableInfo> GetInputsInfo()
167167
{
168-
return _session.InputMetadata.Select(kv => new OnnxNodeInfo(kv.Key, kv.Value.Dimensions.ToList(), kv.Value.ElementType));
168+
return _session.InputMetadata.Select(kv => new OnnxVariableInfo(kv.Key, kv.Value.Dimensions.ToList(), kv.Value.ElementType));
169169
}
170170

171171
/// <summary>
172172
/// Returns output metadata of the ONNX model.
173173
/// </summary>
174174
/// <returns></returns>
175-
private IEnumerable<OnnxNodeInfo> GetOutputsInfo()
175+
private IEnumerable<OnnxVariableInfo> GetOutputsInfo()
176176
{
177-
return _session.OutputMetadata.Select(kv => new OnnxNodeInfo(kv.Key, kv.Value.Dimensions.ToList(), kv.Value.ElementType));
177+
return _session.OutputMetadata.Select(kv => new OnnxVariableInfo(kv.Key, kv.Value.Dimensions.ToList(), kv.Value.ElementType));
178178
}
179179
}
180180

0 commit comments

Comments
 (0)