Package ai.djl.ndarray.types
Class DataDesc
- java.lang.Object
-
- ai.djl.ndarray.types.DataDesc
-
public class DataDesc extends java.lang.ObjectA data descriptor class that encapsulates information of aNDArray.The information includes:
- Optional name of the NDArray
DeviceShapeDataTypeSparseFormat
-
-
Constructor Summary
Constructors Constructor Description DataDesc(Shape shape)Constructs and initializes aDataDescwith specifiedShape.DataDesc(Shape shape, DataType dataType)DataDesc(Shape shape, DataType dataType, java.lang.String name)Constructs and initializes aDataDescwith specifiedShape,DataType, name,DeviceandSparseFormat.DataDesc(Shape shape, java.lang.String name)Constructs and initializes aDataDescwith specifiedShapeand name.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DataTypegetDataType()java.lang.StringgetName()Returns the name of theNDArray.ShapegetShape()voidsetDataType(DataType dataType)voidsetName(java.lang.String name)Sets the name of theNDArray.voidsetShape(Shape shape)java.lang.StringtoString()
-
-
-
Constructor Detail
-
DataDesc
public DataDesc(Shape shape, java.lang.String name)
Constructs and initializes aDataDescwith specifiedShapeand name.
-
-
Method Detail
-
getName
public java.lang.String getName()
Returns the name of theNDArray.- Returns:
- the name of the
NDArray
-
setName
public void setName(java.lang.String name)
Sets the name of theNDArray.- Parameters:
name- the name of theNDArray
-
setDataType
public void setDataType(DataType dataType)
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-