Enum TensorDataType

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<TensorDataType>

    @Deprecated
    public enum TensorDataType
    extends java.lang.Enum<TensorDataType>
    Deprecated.
    To be removed - see https://github.com/KonduitAI/konduit-serving/issues/298
    Possible data types for tensors. Comes with conversions from TensorFlow and Python and between ND4J types.
    • Method Detail

      • values

        public static TensorDataType[] values()
        Deprecated.
        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 (TensorDataType c : TensorDataType.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static TensorDataType valueOf​(java.lang.String name)
        Deprecated.
        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
      • fromProtoValue

        public static TensorDataType fromProtoValue​(java.lang.String value)
        Deprecated.
        Map a tensor data type to a proto value found in tensorflow. Generally, this is just replacing DT_ with empty and returning enum.valueOf(string)
        Parameters:
        value - the input string
        Returns:
        the associated TensorDataType
      • toPythonName

        public static java.lang.String toPythonName​(TensorDataType tensorDataType)
        Deprecated.
        Get the python name for the given data type
        Parameters:
        tensorDataType - the python name for the given data type
        Returns:
        float64 for double, float32 for double, float16 for half, otherwise the type's name converted to lower case
      • toNd4jType

        public static org.nd4j.linalg.api.buffer.DataType toNd4jType​(TensorDataType tensorDataType)
        Deprecated.
      • fromNd4jType

        public static TensorDataType fromNd4jType​(org.nd4j.linalg.api.buffer.DataType dataType)
        Deprecated.
      • fromNd4jType

        public static TensorDataType fromNd4jType​(org.nd4j.linalg.api.ndarray.INDArray array)
        Deprecated.
      • toTFType

        public org.nd4j.tensorflow.conversion.TensorDataType toTFType()
        Deprecated.