Interface Dataset
- All Superinterfaces:
AutoCloseable, Iterable<SampleBatch>
- All Known Implementing Classes:
ImageDataset
A dataset consists of data and an associated target (label)
and can be iterated in mini-batches.
-
Method Summary
Modifier and TypeMethodDescriptionstatic DatasetMNIST contains 70,000 images of handwritten digits: 60,000 for training and 10,000 for testing.static Datasetof(double[][] data, double[] target, int batch) Creates a dataset of numeric arrays.static Datasetof(double[][] data, int[] target, int batch) Creates a dataset of numeric arrays.static Datasetof(float[][] data, float[] target, int batch) Creates a dataset of numeric arrays.static Datasetof(float[][] data, int[] target, int batch) Creates a dataset of numeric arrays.static DatasetReturns a dataset.longsize()Returns the size of dataset.Methods inherited from interface AutoCloseable
closeMethods inherited from interface Iterable
forEach, iterator, spliterator
-
Method Details
-
size
long size()Returns the size of dataset.- Returns:
- the size of dataset.
-
of
Creates a dataset of numeric arrays.- Parameters:
data- the data.target- the target.batch- the mini-batch size.- Returns:
- the dataset.
-
of
Creates a dataset of numeric arrays.- Parameters:
data- the data.target- the target.batch- the mini-batch size.- Returns:
- the dataset.
-
of
Creates a dataset of numeric arrays.- Parameters:
data- the data.target- the target.batch- the mini-batch size.- Returns:
- the dataset.
-
of
Creates a dataset of numeric arrays.- Parameters:
data- the data.target- the target.batch- the mini-batch size.- Returns:
- the dataset.
-
of
-
mnist
MNIST contains 70,000 images of handwritten digits: 60,000 for training and 10,000 for testing. The images are grayscale, 28x28 pixels, and centered.- Parameters:
path- the data folder path.trainMode- load training or test data.batch- the mini-batch size.- Returns:
- the MNIST dataset.
-