Class OnnxModelMetadata


  • public final class OnnxModelMetadata
    extends java.lang.Object
    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.

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(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 returns Optional.empty().
      java.lang.String getDescription()
      Gets the model description.
      java.lang.String getDomain()
      Gets the domain.
      java.lang.String getGraphDescription()
      Gets the graph description.
      java.lang.String getGraphName()
      Gets the graph name.
      java.lang.String getProducerName()
      Gets the producer name.
      long getVersion()
      Gets the model version.
      int hashCode()  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • 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:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.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 returns Optional.empty().
        Parameters:
        key - The custom metadata key.
        Returns:
        The custom metadata value if present.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object