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

    Class AttributeProto

    Attributes

    A named attribute containing either singular float, integer, string, graph, and tensor values, or repeated float, integer, string, graph, and tensor values. An AttributeProto MUST contain the name field, and only one of the following content fields, effectively enforcing a C/C++ union equivalent.

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

    Constructors

    AttributeProto()

    Declaration
    public AttributeProto()

    AttributeProto(AttributeProto)

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

    Fields

    DocStringFieldNumber

    Field number for the "doc_string" field.

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

    FFieldNumber

    Field number for the "f" field.

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

    FloatsFieldNumber

    Field number for the "floats" field.

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

    GFieldNumber

    Field number for the "g" field.

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

    GraphsFieldNumber

    Field number for the "graphs" field.

    Declaration
    public const int GraphsFieldNumber = 11
    Field Value
    Type Description
    Int32

    IFieldNumber

    Field number for the "i" field.

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

    IntsFieldNumber

    Field number for the "ints" field.

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

    NameFieldNumber

    Field number for the "name" field.

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

    RefAttrNameFieldNumber

    Field number for the "ref_attr_name" field.

    Declaration
    public const int RefAttrNameFieldNumber = 21
    Field Value
    Type Description
    Int32

    SFieldNumber

    Field number for the "s" field.

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

    SparseTensorFieldNumber

    Field number for the "sparse_tensor" field.

    Declaration
    public const int SparseTensorFieldNumber = 22
    Field Value
    Type Description
    Int32

    SparseTensorsFieldNumber

    Field number for the "sparse_tensors" field.

    Declaration
    public const int SparseTensorsFieldNumber = 23
    Field Value
    Type Description
    Int32

    StringsFieldNumber

    Field number for the "strings" field.

    Declaration
    public const int StringsFieldNumber = 9
    Field Value
    Type Description
    Int32

    TensorsFieldNumber

    Field number for the "tensors" field.

    Declaration
    public const int TensorsFieldNumber = 10
    Field Value
    Type Description
    Int32

    TFieldNumber

    Field number for the "t" field.

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

    TypeFieldNumber

    Field number for the "type" field.

    Declaration
    public const int TypeFieldNumber = 20
    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 attribute. Markdown is allowed.

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

    F

    Exactly ONE of the following fields must be present for this version of the IR

    Declaration
    public float F { get; set; }
    Property Value
    Type Description
    Single

    Floats

    list of floats

    Declaration
    public Google.Protobuf.Collections.RepeatedField<float> Floats { get; }
    Property Value
    Type Description
    Google.Protobuf.Collections.RepeatedField<Single>

    G

    graph

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

    Graphs

    list of graph

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

    I

    int

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

    Ints

    list of ints

    Declaration
    public Google.Protobuf.Collections.RepeatedField<long> Ints { get; }
    Property Value
    Type Description
    Google.Protobuf.Collections.RepeatedField<Int64>

    Name

    The name field MUST be present for this version of the IR.

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

    Parser

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

    RefAttrName

    if ref_attr_name is not empty, ref_attr_name is the attribute name in parent function. In this case, this AttributeProto does not contain data, and it's a reference of attribute in parent scope. NOTE: This should ONLY be used in function (sub-graph). It's invalid to be used in main graph.

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

    S

    UTF-8 string

    Declaration
    public Google.Protobuf.ByteString S { get; set; }
    Property Value
    Type Description
    Google.Protobuf.ByteString

    SparseTensor

    sparse tensor value

    Declaration
    public SparseTensorProto SparseTensor { get; set; }
    Property Value
    Type Description
    SparseTensorProto

    SparseTensors

    list of sparse tensors

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

    Strings

    list of UTF-8 strings

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

    T

    tensor value

    Declaration
    public TensorProto T { get; set; }
    Property Value
    Type Description
    TensorProto

    Tensors

    list of tensors

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

    Type

    The type field MUST be present for this version of the IR. For 0.0.1 versions of the IR, this field was not defined, and implementations needed to use has_field hueristics to determine which value field was in use. For IR_VERSION 0.0.2 or later, this field MUST be set and match the f|i|s|t|... field in use. This change was made to accomodate proto3 implementations.

    Declaration
    public AttributeProto.Types.AttributeType Type { get; set; }
    Property Value
    Type Description
    AttributeProto.Types.AttributeType

    Methods

    CalculateSize()

    Declaration
    public int CalculateSize()
    Returns
    Type Description
    Int32

    Clone()

    Declaration
    public AttributeProto Clone()
    Returns
    Type Description
    AttributeProto

    Equals(AttributeProto)

    Declaration
    public bool Equals(AttributeProto other)
    Parameters
    Type Name Description
    AttributeProto 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(AttributeProto)

    Declaration
    public void MergeFrom(AttributeProto other)
    Parameters
    Type Name Description
    AttributeProto 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