-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Make extension points abstract classes.
* Improve ML.NET version handling to actually rely on the assembly vs. a constant string we have to change. * Tighten checks of arguments to the context implementation.
- Loading branch information
Showing
27 changed files
with
130 additions
and
113 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
// See the LICENSE file in the project root for more information. | ||
|
||
using System.Collections.Generic; | ||
using Microsoft.ML.Runtime.Data; | ||
|
||
namespace Microsoft.ML.Runtime.Model.Onnx | ||
{ | ||
/// <summary> | ||
/// An abstraction for an ONNX node as created by | ||
/// <see cref="OnnxContext.CreateNode(string, IEnumerable{string}, IEnumerable{string}, string, string)"/>. | ||
/// That method creates a with inputs and outputs, but this object can modify the node further | ||
/// by adding attributes (in ONNX parlance, attributes are more or less constant parameterizations). | ||
/// </summary> | ||
public abstract class OnnxNode | ||
{ | ||
public abstract void AddAttribute(string argName, double value); | ||
public abstract void AddAttribute(string argName, long value); | ||
public abstract void AddAttribute(string argName, DvText value); | ||
public abstract void AddAttribute(string argName, string value); | ||
public abstract void AddAttribute(string argName, bool value); | ||
|
||
public abstract void AddAttribute(string argName, IEnumerable<double> value); | ||
public abstract void AddAttribute(string argName, IEnumerable<float> value); | ||
public abstract void AddAttribute(string argName, IEnumerable<long> value); | ||
public abstract void AddAttribute(string argName, IEnumerable<DvText> value); | ||
public abstract void AddAttribute(string argName, string[] value); | ||
public abstract void AddAttribute(string argName, IEnumerable<string> value); | ||
public abstract void AddAttribute(string argName, IEnumerable<bool> value); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.