Enum TensorInfo.OnnxTensorType

    • Field Detail

      • value

        public final int value
        The int id on the native side.
    • Method Detail

      • values

        public static TensorInfo.OnnxTensorType[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (TensorInfo.OnnxTensorType c : TensorInfo.OnnxTensorType.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static TensorInfo.OnnxTensorType valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • mapFromInt

        public static TensorInfo.OnnxTensorType mapFromInt​(int value)
        Maps from the C API's int enum to the Java enum.
        Parameters:
        value - The index of the Java enum.
        Returns:
        The Java enum.
      • mapFromJavaType

        public static TensorInfo.OnnxTensorType mapFromJavaType​(OnnxJavaType type)
        Maps a OnnxJavaType into the appropriate native element type.
        Parameters:
        type - The type of the Java input/output.
        Returns:
        The native element type.