Package ai.onnxruntime
Class OnnxModelMetadata
java.lang.Object
ai.onnxruntime.OnnxModelMetadata
Contains the metadata associated with an ONNX model.
Unspecified default fields contain the empty string.
This class is a Java side copy of the native metadata, it does not access the native runtime.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanGets an unmodifiable reference to the complete custom metadata.Returns Optional.of(value) if the custom metadata has a value for the supplied key, otherwise returnsOptional.empty().Gets the model description.Gets the domain.Gets the graph description.Gets the graph name.Gets the producer name.longGets the model version.inthashCode()toString()
-
Constructor Details
-
OnnxModelMetadata
Copy constructor.- Parameters:
other- The metadata to copy.
-
-
Method Details
-
equals
-
hashCode
public int hashCode() -
getProducerName
Gets the producer name.- Returns:
- The producer name.
-
getGraphName
Gets the graph name.- Returns:
- The graph name.
-
getGraphDescription
Gets the graph description.- Returns:
- The graph description.
-
getDomain
Gets the domain.- Returns:
- The domain.
-
getDescription
Gets the model description.- Returns:
- The description.
-
getVersion
public long getVersion()Gets the model version.- Returns:
- The model version.
-
getCustomMetadata
Gets an unmodifiable reference to the complete custom metadata.- Returns:
- The custom metadata.
-
getCustomMetadataValue
Returns Optional.of(value) if the custom metadata has a value for the supplied key, otherwise returnsOptional.empty().- Parameters:
key- The custom metadata key.- Returns:
- The custom metadata value if present.
-
toString
-