Class ModelProto | Barracuda | 0.5.0-preview
docs.unity3d.com
    Show / Hide Table of Contents

    Class ModelProto

    Models

    ModelProto is a top-level file/container format for bundling a ML model and associating its computation graph with metadata.

    The semantics of the model are described by the associated GraphProto.

    Inheritance
    Object
    ModelProto
    Namespace: Onnx
    Syntax
    public sealed class ModelProto : Google.Protobuf.IMessage<ModelProto>

    Constructors

    ModelProto()

    Declaration
    public ModelProto()

    ModelProto(ModelProto)

    Declaration
    public ModelProto(ModelProto other)
    Parameters
    Type Name Description
    ModelProto other

    Fields

    DocStringFieldNumber

    Field number for the "doc_string" field.

    Declaration
    public const int DocStringFieldNumber = 6
    Field Value
    Type Description
    Int32

    DomainFieldNumber

    Field number for the "domain" field.

    Declaration
    public const int DomainFieldNumber = 4
    Field Value
    Type Description
    Int32

    GraphFieldNumber

    Field number for the "graph" field.

    Declaration
    public const int GraphFieldNumber = 7
    Field Value
    Type Description
    Int32

    IrVersionFieldNumber

    Field number for the "ir_version" field.

    Declaration
    public const int IrVersionFieldNumber = 1
    Field Value
    Type Description
    Int32

    MetadataPropsFieldNumber

    Field number for the "metadata_props" field.

    Declaration
    public const int MetadataPropsFieldNumber = 14
    Field Value
    Type Description
    Int32

    ModelVersionFieldNumber

    Field number for the "model_version" field.

    Declaration
    public const int ModelVersionFieldNumber = 5
    Field Value
    Type Description
    Int32

    OpsetImportFieldNumber

    Field number for the "opset_import" field.

    Declaration
    public const int OpsetImportFieldNumber = 8
    Field Value
    Type Description
    Int32

    ProducerNameFieldNumber

    Field number for the "producer_name" field.

    Declaration
    public const int ProducerNameFieldNumber = 2
    Field Value
    Type Description
    Int32

    ProducerVersionFieldNumber

    Field number for the "producer_version" field.

    Declaration
    public const int ProducerVersionFieldNumber = 3
    Field Value
    Type Description
    Int32

    Properties

    Descriptor

    Declaration
    public static Google.Protobuf.Reflection.MessageDescriptor Descriptor { get; }
    Property Value
    Type Description
    Google.Protobuf.Reflection.MessageDescriptor

    DocString

    A human-readable documentation for this model. Markdown is allowed.

    Declaration
    public string DocString { get; set; }
    Property Value
    Type Description
    String

    Domain

    Domain name of the model. We use reverse domain names as name space indicators. For example: com.facebook.fair or com.microsoft.cognitiveservices

    Together with model_version and GraphProto.name, this forms the unique identity of the graph.

    Declaration
    public string Domain { get; set; }
    Property Value
    Type Description
    String

    Graph

    The parameterized graph that is evaluated to execute the model.

    Declaration
    public GraphProto Graph { get; set; }
    Property Value
    Type Description
    GraphProto

    IrVersion

    The version of the IR this model targets. See Version enum above. This field MUST be present.

    Declaration
    public long IrVersion { get; set; }
    Property Value
    Type Description
    Int64

    MetadataProps

    Named metadata values; keys should be distinct.

    Declaration
    public Google.Protobuf.Collections.RepeatedField<StringStringEntryProto> MetadataProps { get; }
    Property Value
    Type Description
    Google.Protobuf.Collections.RepeatedField<StringStringEntryProto>

    ModelVersion

    The version of the graph encoded. See Version enum below.

    Declaration
    public long ModelVersion { get; set; }
    Property Value
    Type Description
    Int64

    OpsetImport

    The OperatorSets this model relies on. All ModelProtos MUST have at least one entry that specifies which version of the ONNX OperatorSet is being imported.

    All nodes in the ModelProto's graph will bind against the operator with the same-domain/same-op_type operator with the HIGHEST version in the referenced operator sets.

    Declaration
    public Google.Protobuf.Collections.RepeatedField<OperatorSetIdProto> OpsetImport { get; }
    Property Value
    Type Description
    Google.Protobuf.Collections.RepeatedField<OperatorSetIdProto>

    Parser

    Declaration
    public static Google.Protobuf.MessageParser<ModelProto> Parser { get; }
    Property Value
    Type Description
    Google.Protobuf.MessageParser<ModelProto>

    ProducerName

    The name of the framework or tool used to generate this model. This field SHOULD be present to indicate which implementation/tool/framework emitted the model.

    Declaration
    public string ProducerName { get; set; }
    Property Value
    Type Description
    String

    ProducerVersion

    The version of the framework or tool used to generate this model. This field SHOULD be present to indicate which implementation/tool/framework emitted the model.

    Declaration
    public string ProducerVersion { get; set; }
    Property Value
    Type Description
    String

    Methods

    CalculateSize()

    Declaration
    public int CalculateSize()
    Returns
    Type Description
    Int32

    Clone()

    Declaration
    public ModelProto Clone()
    Returns
    Type Description
    ModelProto

    Equals(ModelProto)

    Declaration
    public bool Equals(ModelProto other)
    Parameters
    Type Name Description
    ModelProto other
    Returns
    Type Description
    Boolean

    Equals(Object)

    Declaration
    public override bool Equals(object other)
    Parameters
    Type Name Description
    Object other
    Returns
    Type Description
    Boolean

    GetHashCode()

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    Int32

    MergeFrom(Google.Protobuf.CodedInputStream)

    Declaration
    public void MergeFrom(Google.Protobuf.CodedInputStream input)
    Parameters
    Type Name Description
    Google.Protobuf.CodedInputStream input

    MergeFrom(ModelProto)

    Declaration
    public void MergeFrom(ModelProto other)
    Parameters
    Type Name Description
    ModelProto other

    ToString()

    Declaration
    public override string ToString()
    Returns
    Type Description
    String

    WriteTo(Google.Protobuf.CodedOutputStream)

    Declaration
    public void WriteTo(Google.Protobuf.CodedOutputStream output)
    Parameters
    Type Name Description
    Google.Protobuf.CodedOutputStream output
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023