Class Record
- java.lang.Object
-
- ai.djl.training.dataset.Record
-
public class Record extends java.lang.ObjectRecordrepresents a single element of data and labels fromDataset.The data and labels in record are in the form of an
NDList. This allows it to hold multiple types of data and labels. However, note that theNDListdoes not include a dimension for batch.In a
Record, data and label are each anNDList. The dataNDListrepresents the data for each input in the batch. Similarly, the labelNDListrepresents the labels for each output.For example, an Image Question and Answer dataset has two inputs: an image and a question. In this case, the data in the
Recordwill be anNDListcontaining a CHW imageNDArrayand a TC questionNDArray. The label will be anNDListcontaining only a TC answerNDArray.In order to differentiate a batch vs a single record (despite them both consisting of two
NDLists), we have theBatchand theRecordclasses respectively.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description NDListgetData()Gets the data of thisRecord.NDListgetLabels()Gets the labels that correspond to the data of thisRecord.
-