Class Record
- java.lang.Object
-
- ai.djl.training.dataset.Record
-
public class Record extends java.lang.Object
Record
represents 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 theNDList
does not include a dimension for batch.In a
Record
, data and label are each anNDList
. The dataNDList
represents the data for each input in the batch. Similarly, the labelNDList
represents 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
Record
will be anNDList
containing a CHW imageNDArray
and a TC questionNDArray
. The label will be anNDList
containing only a TC answerNDArray
.In order to differentiate a batch vs a single record (despite them both consisting of two
NDList
s), we have theBatch
and theRecord
classes respectively.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description NDList
getData()
Gets the data of thisRecord
.NDList
getLabels()
Gets the labels that correspond to the data of thisRecord
.
-