Package ai.onnx.proto
Interface OnnxMl.AttributeProtoOrBuilder
- All Superinterfaces:
com.google.protobuf.MessageLiteOrBuilder
,com.google.protobuf.MessageOrBuilder
- All Known Implementing Classes:
OnnxMl.AttributeProto
,OnnxMl.AttributeProto.Builder
- Enclosing class:
- OnnxMl
public static interface OnnxMl.AttributeProtoOrBuilder
extends com.google.protobuf.MessageOrBuilder
-
Method Summary
Modifier and TypeMethodDescriptionA human-readable documentation for this attribute.com.google.protobuf.ByteString
A human-readable documentation for this attribute.float
getF()
Exactly ONE of the following fields must be present for this version of the IRfloat
getFloats
(int index) list of floatsint
list of floatslist of floatsgetG()
graphgraphgetGraphs
(int index) list of graphint
list of graphlist of graphgetGraphsOrBuilder
(int index) list of graphList<? extends OnnxMl.GraphProtoOrBuilder>
list of graphlong
getI()
intlong
getInts
(int index) list of intsint
list of intslist of intsgetName()
The name field MUST be present for this version of the IR.com.google.protobuf.ByteString
The name field MUST be present for this version of the IR.if ref_attr_name is not empty, ref_attr_name is the attribute name in parent function.com.google.protobuf.ByteString
if ref_attr_name is not empty, ref_attr_name is the attribute name in parent function.com.google.protobuf.ByteString
getS()
UTF-8 stringsparse tensor valuesparse tensor valuegetSparseTensors
(int index) list of sparse tensorsint
list of sparse tensorslist of sparse tensorsgetSparseTensorsOrBuilder
(int index) list of sparse tensorsList<? extends OnnxMl.SparseTensorProtoOrBuilder>
list of sparse tensorscom.google.protobuf.ByteString
getStrings
(int index) list of UTF-8 stringsint
list of UTF-8 stringsList<com.google.protobuf.ByteString>
list of UTF-8 stringsgetT()
tensor valuegetTensors
(int index) list of tensorsint
list of tensorslist of tensorsgetTensorsOrBuilder
(int index) list of tensorsList<? extends OnnxMl.TensorProtoOrBuilder>
list of tensorstensor valuegetType()
The type field MUST be present for this version of the IR.boolean
A human-readable documentation for this attribute.boolean
hasF()
Exactly ONE of the following fields must be present for this version of the IRboolean
hasG()
graphboolean
hasI()
intboolean
hasName()
The name field MUST be present for this version of the IR.boolean
if ref_attr_name is not empty, ref_attr_name is the attribute name in parent function.boolean
hasS()
UTF-8 stringboolean
sparse tensor valueboolean
hasT()
tensor valueboolean
hasType()
The type field MUST be present for this version of the IR.Methods inherited from interface com.google.protobuf.MessageLiteOrBuilder
isInitialized
Methods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getDefaultInstanceForType, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
hasName
boolean hasName()The name field MUST be present for this version of the IR.
optional string name = 1;
- Returns:
- Whether the name field is set.
-
getName
String getName()The name field MUST be present for this version of the IR.
optional string name = 1;
- Returns:
- The name.
-
getNameBytes
com.google.protobuf.ByteString getNameBytes()The name field MUST be present for this version of the IR.
optional string name = 1;
- Returns:
- The bytes for name.
-
hasRefAttrName
boolean hasRefAttrName()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.
optional string ref_attr_name = 21;
- Returns:
- Whether the refAttrName field is set.
-
getRefAttrName
String getRefAttrName()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.
optional string ref_attr_name = 21;
- Returns:
- The refAttrName.
-
getRefAttrNameBytes
com.google.protobuf.ByteString getRefAttrNameBytes()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.
optional string ref_attr_name = 21;
- Returns:
- The bytes for refAttrName.
-
hasDocString
boolean hasDocString()A human-readable documentation for this attribute. Markdown is allowed.
optional string doc_string = 13;
- Returns:
- Whether the docString field is set.
-
getDocString
String getDocString()A human-readable documentation for this attribute. Markdown is allowed.
optional string doc_string = 13;
- Returns:
- The docString.
-
getDocStringBytes
com.google.protobuf.ByteString getDocStringBytes()A human-readable documentation for this attribute. Markdown is allowed.
optional string doc_string = 13;
- Returns:
- The bytes for docString.
-
hasType
boolean hasType()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 heuristics 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 accommodate proto3 implementations.
optional .onnx.AttributeProto.AttributeType type = 20;
- Returns:
- Whether the type field is set.
-
getType
OnnxMl.AttributeProto.AttributeType getType()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 heuristics 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 accommodate proto3 implementations.
optional .onnx.AttributeProto.AttributeType type = 20;
- Returns:
- The type.
-
hasF
boolean hasF()Exactly ONE of the following fields must be present for this version of the IR
optional float f = 2;
- Returns:
- Whether the f field is set.
-
getF
float getF()Exactly ONE of the following fields must be present for this version of the IR
optional float f = 2;
- Returns:
- The f.
-
hasI
boolean hasI()int
optional int64 i = 3;
- Returns:
- Whether the i field is set.
-
getI
long getI()int
optional int64 i = 3;
- Returns:
- The i.
-
hasS
boolean hasS()UTF-8 string
optional bytes s = 4;
- Returns:
- Whether the s field is set.
-
getS
com.google.protobuf.ByteString getS()UTF-8 string
optional bytes s = 4;
- Returns:
- The s.
-
hasT
boolean hasT()tensor value
optional .onnx.TensorProto t = 5;
- Returns:
- Whether the t field is set.
-
getT
OnnxMl.TensorProto getT()tensor value
optional .onnx.TensorProto t = 5;
- Returns:
- The t.
-
getTOrBuilder
OnnxMl.TensorProtoOrBuilder getTOrBuilder()tensor value
optional .onnx.TensorProto t = 5;
-
hasG
boolean hasG()graph
optional .onnx.GraphProto g = 6;
- Returns:
- Whether the g field is set.
-
getG
OnnxMl.GraphProto getG()graph
optional .onnx.GraphProto g = 6;
- Returns:
- The g.
-
getGOrBuilder
OnnxMl.GraphProtoOrBuilder getGOrBuilder()graph
optional .onnx.GraphProto g = 6;
-
hasSparseTensor
boolean hasSparseTensor()sparse tensor value
optional .onnx.SparseTensorProto sparse_tensor = 22;
- Returns:
- Whether the sparseTensor field is set.
-
getSparseTensor
OnnxMl.SparseTensorProto getSparseTensor()sparse tensor value
optional .onnx.SparseTensorProto sparse_tensor = 22;
- Returns:
- The sparseTensor.
-
getSparseTensorOrBuilder
OnnxMl.SparseTensorProtoOrBuilder getSparseTensorOrBuilder()sparse tensor value
optional .onnx.SparseTensorProto sparse_tensor = 22;
-
getFloatsList
list of floats
repeated float floats = 7;
- Returns:
- A list containing the floats.
-
getFloatsCount
int getFloatsCount()list of floats
repeated float floats = 7;
- Returns:
- The count of floats.
-
getFloats
float getFloats(int index) list of floats
repeated float floats = 7;
- Parameters:
index
- The index of the element to return.- Returns:
- The floats at the given index.
-
getIntsList
list of ints
repeated int64 ints = 8;
- Returns:
- A list containing the ints.
-
getIntsCount
int getIntsCount()list of ints
repeated int64 ints = 8;
- Returns:
- The count of ints.
-
getInts
long getInts(int index) list of ints
repeated int64 ints = 8;
- Parameters:
index
- The index of the element to return.- Returns:
- The ints at the given index.
-
getStringsList
List<com.google.protobuf.ByteString> getStringsList()list of UTF-8 strings
repeated bytes strings = 9;
- Returns:
- A list containing the strings.
-
getStringsCount
int getStringsCount()list of UTF-8 strings
repeated bytes strings = 9;
- Returns:
- The count of strings.
-
getStrings
com.google.protobuf.ByteString getStrings(int index) list of UTF-8 strings
repeated bytes strings = 9;
- Parameters:
index
- The index of the element to return.- Returns:
- The strings at the given index.
-
getTensorsList
List<OnnxMl.TensorProto> getTensorsList()list of tensors
repeated .onnx.TensorProto tensors = 10;
-
getTensors
list of tensors
repeated .onnx.TensorProto tensors = 10;
-
getTensorsCount
int getTensorsCount()list of tensors
repeated .onnx.TensorProto tensors = 10;
-
getTensorsOrBuilderList
List<? extends OnnxMl.TensorProtoOrBuilder> getTensorsOrBuilderList()list of tensors
repeated .onnx.TensorProto tensors = 10;
-
getTensorsOrBuilder
list of tensors
repeated .onnx.TensorProto tensors = 10;
-
getGraphsList
List<OnnxMl.GraphProto> getGraphsList()list of graph
repeated .onnx.GraphProto graphs = 11;
-
getGraphs
list of graph
repeated .onnx.GraphProto graphs = 11;
-
getGraphsCount
int getGraphsCount()list of graph
repeated .onnx.GraphProto graphs = 11;
-
getGraphsOrBuilderList
List<? extends OnnxMl.GraphProtoOrBuilder> getGraphsOrBuilderList()list of graph
repeated .onnx.GraphProto graphs = 11;
-
getGraphsOrBuilder
list of graph
repeated .onnx.GraphProto graphs = 11;
-
getSparseTensorsList
List<OnnxMl.SparseTensorProto> getSparseTensorsList()list of sparse tensors
repeated .onnx.SparseTensorProto sparse_tensors = 23;
-
getSparseTensors
list of sparse tensors
repeated .onnx.SparseTensorProto sparse_tensors = 23;
-
getSparseTensorsCount
int getSparseTensorsCount()list of sparse tensors
repeated .onnx.SparseTensorProto sparse_tensors = 23;
-
getSparseTensorsOrBuilderList
List<? extends OnnxMl.SparseTensorProtoOrBuilder> getSparseTensorsOrBuilderList()list of sparse tensors
repeated .onnx.SparseTensorProto sparse_tensors = 23;
-
getSparseTensorsOrBuilder
list of sparse tensors
repeated .onnx.SparseTensorProto sparse_tensors = 23;
-