AttributeProto

Models & Types · AiDotNet.Onnx.Protobuf

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.

Implements: IBufferMessage, IMessage<AttributeProto>

Constructors

Constructor Summary
AttributeProto()
AttributeProto(AttributeProto other)

Properties

Property Summary
AttributeType Type { get; set; } The type field MUST be present for this version of the IR.
ByteString S { get; set; } UTF-8 string
GraphProto G { get; set; } graph
MessageDescriptor Descriptor { get; }
MessageParser<AttributeProto> Parser { get; }
RepeatedField<ByteString> Strings { get; } list of UTF-8 strings
RepeatedField<GraphProto> Graphs { get; } list of graph
RepeatedField<SparseTensorProto> SparseTensors { get; } list of sparse tensors
RepeatedField<TensorProto> Tensors { get; } list of tensors
RepeatedField<TypeProto> TypeProtos { get; } list of type protos
RepeatedField<float> Floats { get; } list of floats
RepeatedField<long> Ints { get; } list of ints
SparseTensorProto SparseTensor { get; set; } sparse tensor value
TensorProto T { get; set; } tensor value
TypeProto Tp { get; set; } Do not use field below, it’s deprecated.
float F { get; set; } Exactly ONE of the following fields must be present for this version of the IR
long I { get; set; } int
string DocString { get; set; } A human-readable documentation for this attribute.
string Name { get; set; } The name field MUST be present for this version of the IR.
string RefAttrName { get; set; } if ref_attr_name is not empty, ref_attr_name is the attribute name in parent function.

Methods

Method Summary
AttributeProto Clone()
bool Equals(AttributeProto other)
bool Equals(object other)
int CalculateSize()
int GetHashCode()
string ToString()
void MergeFrom(AttributeProto other)
void MergeFrom(CodedInputStream input)
void WriteTo(CodedOutputStream output)

Fields

Field Summary
int DocStringFieldNumber Field number for the “doc_string” field.
int FFieldNumber Field number for the “f” field.
int FloatsFieldNumber Field number for the “floats” field.
int GFieldNumber Field number for the “g” field.
int GraphsFieldNumber Field number for the “graphs” field.
int IFieldNumber Field number for the “i” field.
int IntsFieldNumber Field number for the “ints” field.
int NameFieldNumber Field number for the “name” field.
int RefAttrNameFieldNumber Field number for the “ref_attr_name” field.
int SFieldNumber Field number for the “s” field.
int SparseTensorFieldNumber Field number for the “sparse_tensor” field.
int SparseTensorsFieldNumber Field number for the “sparse_tensors” field.
int StringsFieldNumber Field number for the “strings” field.
int TFieldNumber Field number for the “t” field.
int TensorsFieldNumber Field number for the “tensors” field.
int TpFieldNumber Field number for the “tp” field.
int TypeFieldNumber Field number for the “type” field.
int TypeProtosFieldNumber Field number for the “type_protos” field.