Package ai.onnxruntime
Class OnnxModelMetadata
- java.lang.Object
-
- ai.onnxruntime.OnnxModelMetadata
-
public final class OnnxModelMetadata extends java.lang.ObjectContains 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 Constructor Description OnnxModelMetadata(OnnxModelMetadata other)Copy constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object o)java.util.Map<java.lang.String,java.lang.String>getCustomMetadata()Gets an unmodifiable reference to the complete custom metadata.java.util.Optional<java.lang.String>getCustomMetadataValue(java.lang.String key)Returns Optional.of(value) if the custom metadata has a value for the supplied key, otherwise returnsOptional.empty().java.lang.StringgetDescription()Gets the model description.java.lang.StringgetDomain()Gets the domain.java.lang.StringgetGraphDescription()Gets the graph description.java.lang.StringgetGraphName()Gets the graph name.java.lang.StringgetProducerName()Gets the producer name.longgetVersion()Gets the model version.inthashCode()java.lang.StringtoString()
-
-
-
Constructor Detail
-
OnnxModelMetadata
public OnnxModelMetadata(OnnxModelMetadata other)
Copy constructor.- Parameters:
other- The metadata to copy.
-
-
Method Detail
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
getProducerName
public java.lang.String getProducerName()
Gets the producer name.- Returns:
- The producer name.
-
getGraphName
public java.lang.String getGraphName()
Gets the graph name.- Returns:
- The graph name.
-
getGraphDescription
public java.lang.String getGraphDescription()
Gets the graph description.- Returns:
- The graph description.
-
getDomain
public java.lang.String getDomain()
Gets the domain.- Returns:
- The domain.
-
getDescription
public java.lang.String getDescription()
Gets the model description.- Returns:
- The description.
-
getVersion
public long getVersion()
Gets the model version.- Returns:
- The model version.
-
getCustomMetadata
public java.util.Map<java.lang.String,java.lang.String> getCustomMetadata()
Gets an unmodifiable reference to the complete custom metadata.- Returns:
- The custom metadata.
-
getCustomMetadataValue
public java.util.Optional<java.lang.String> getCustomMetadataValue(java.lang.String key)
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
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-