Class OnnxSequence

  • All Implemented Interfaces:
    OnnxValue, java.lang.AutoCloseable

    public class OnnxSequence
    extends java.lang.Object
    implements OnnxValue
    A sequence of OnnxValues all of the same type.

    Supports the types mentioned in "onnxruntime_c_api.h", currently String, Long, Float, Double, Map>String,Float<, Map>Long,Float<.

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()
      Closes this sequence, releasing the native memory backing it and it's elements.
      SequenceInfo getInfo()
      Gets the type info object associated with this OnnxValue.
      OnnxValue.OnnxValueType getType()
      Gets the type of this OnnxValue.
      java.util.List<java.lang.Object> getValue()
      Extracts a Java object from the native ONNX type.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Method Detail

      • getValue

        public java.util.List<java.lang.Object> getValue()
                                                  throws OrtException
        Extracts a Java object from the native ONNX type.

        Returns either a List of boxed primitives, Strings, or Maps.

        Specified by:
        getValue in interface OnnxValue
        Returns:
        A Java object containing the value.
        Throws:
        OrtException - If the runtime failed to read an element.
      • getInfo

        public SequenceInfo getInfo()
        Description copied from interface: OnnxValue
        Gets the type info object associated with this OnnxValue.
        Specified by:
        getInfo in interface OnnxValue
        Returns:
        The type information.
      • toString

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

        public void close()
        Closes this sequence, releasing the native memory backing it and it's elements.
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface OnnxValue