Class ResourceDataSets
- java.lang.Object
-
- org.eclipse.deeplearning4j.resources.ResourceDataSets
-
public class ResourceDataSets extends Object
Top level class for leveraging pre curated datasets The pattern of usage for a default directory is: DataSetResource resource = ResourceDataSets.(..); For specifying a directory, for download it's: DataSetResource customDirResource = ResourceDataSets(yourCustomDirPath); A user can then specify a resource download with: resource.download(..); A user won't normally use this class directly. It's common underlying tooling for the pre existing dataset iterators such as the MNISTDataSetIterator,EMnistDataSetIterator,LFWDataSetIterator as well as the BaseImageLoader- Author:
- Adam Gibson
-
-
Constructor Summary
Constructors Constructor Description ResourceDataSets()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static DataSetResourcecifar10()The cifar 10 dataset with a default directory of:CifarResourceConstants.CIFAR_DEFAULT_DIRstatic DataSetResourcecifar10(File topLevelDir)The cifar10 datasetstatic DataSetResourceemnistLabelsTest(EMnistSet set)The emnist test labelsstatic DataSetResourceemnistLabelsTest(EMnistSet set, File topLevelDir)The emnist test labelsstatic DataSetResourceemnistLabelsTrain(EMnistSet set)The emnist train labelsstatic DataSetResourceemnistLabelsTrain(EMnistSet set, File topLevelDir)static DataSetResourceemnistMappingTest(EMnistSet set)The input mapping for the test setstatic DataSetResourceemnistMappingTest(EMnistSet set, File topLevelDir)The input label mapping for the test setstatic DataSetResourceemnistMappingTrain(EMnistSet set)Download the training file for emnist mappingstatic DataSetResourceemnistMappingTrain(EMnistSet set, File topLevelDir)The input mapping for the training setstatic DataSetResourceemnistTest(EMnistSet set)The emnist test labelsstatic DataSetResourceemnistTest(EMnistSet set, File topLevelDir)The emnist test labelsstatic DataSetResourceemnistTrain(EMnistSet set)The emnist test labelsstatic DataSetResourceemnistTrain(EMnistSet set, File topLevelDir)The emnist train labelsstatic DataSetResourcelfwFullData()Input images for the LFW full dataset with a top level directory of:LFWResourceConstants.LFW_FULL_DIRstatic DataSetResourcelfwFullData(File topLevelDir)Input images for the LFW full datasetstatic DataSetResourcelfwFullLabels()Input labels for the LFW full dataset with a top level directory of:LFWResourceConstants.LFW_FULL_DIRstatic DataSetResourcelfwFullLabels(File topLevelDir)Labels for the LFW full datasetstatic DataSetResourcelfwSubData()Input images for the LFW smaller dataset with a top level directory of:LFWResourceConstants.LFW_SUB_DIRstatic DataSetResourcelfwSubData(File topLevelDir)Input images for the LFW smaller datasetstatic DataSetResourcemnistTest()The mnist test set input with a top level directory of:DL4JResources.getBaseDirectory()static DataSetResourcemnistTest(File topLevelDir)The mnist test imagesstatic DataSetResourcemnistTestLabels()The mnist test set labels with a top level directory of:DL4JResources.getBaseDirectory()static DataSetResourcemnistTestLabels(File topLevelDir)The mnist test labelsstatic DataSetResourcemnistTrain()The mnist training input data with a default directory of:DL4JResources.getBaseDirectory()static DataSetResourcemnistTrain(File topLevelDir)The mnist training setstatic DataSetResourcemnistTrainLabels()The mnist train labels with a top level directory of:DL4JResources.getBaseDirectory()static DataSetResourcemnistTrainLabels(File topLevelDir)The mnist training labelsstatic voidsetTopLevelResourceDir(File topLevelResourceDir)Set the top level directory.static FiletopLevelResourceDir()The default top level directory for storing data
-
-
-
Method Detail
-
topLevelResourceDir
public static File topLevelResourceDir()
The default top level directory for storing data- Returns:
-
setTopLevelResourceDir
public static void setTopLevelResourceDir(File topLevelResourceDir)
Set the top level directory. If intended for use, this should be set before using any datasets or other resources.- Parameters:
topLevelResourceDir- the new directory to use
-
emnistMappingTrain
public static DataSetResource emnistMappingTrain(EMnistSet set)
Download the training file for emnist mapping- Parameters:
set- the set to download- Returns:
- the resource representing the subset
-
emnistMappingTest
public static DataSetResource emnistMappingTest(EMnistSet set)
The input mapping for the test set- Parameters:
set-- Returns:
-
emnistMappingTrain
public static DataSetResource emnistMappingTrain(EMnistSet set, File topLevelDir)
The input mapping for the training set- Parameters:
set- the emnist subset to usetopLevelDir- the top level directory to download to- Returns:
-
emnistMappingTest
public static DataSetResource emnistMappingTest(EMnistSet set, File topLevelDir)
The input label mapping for the test set- Parameters:
set- the subset of emnist to usetopLevelDir- the custom top level directory- Returns:
-
emnistLabelsTrain
public static DataSetResource emnistLabelsTrain(EMnistSet set, File topLevelDir)
- Parameters:
set-topLevelDir-- Returns:
-
emnistLabelsTest
public static DataSetResource emnistLabelsTest(EMnistSet set, File topLevelDir)
The emnist test labels- Parameters:
set- the emnist subset to downloadtopLevelDir- the top level directory to use- Returns:
-
emnistLabelsTrain
public static DataSetResource emnistLabelsTrain(EMnistSet set)
The emnist train labels- Parameters:
set- the emnist subset to download- Returns:
-
emnistLabelsTest
public static DataSetResource emnistLabelsTest(EMnistSet set)
The emnist test labels- Parameters:
set- the emnist subset to download- Returns:
-
emnistTrain
public static DataSetResource emnistTrain(EMnistSet set, File topLevelDir)
The emnist train labels- Parameters:
set- the emnist subset to downloadtopLevelDir- the top level directory to download to- Returns:
-
emnistTest
public static DataSetResource emnistTest(EMnistSet set, File topLevelDir)
The emnist test labels- Parameters:
set- the emnist subset to downloadtopLevelDir- the top level directory to download to- Returns:
-
emnistTrain
public static DataSetResource emnistTrain(EMnistSet set)
The emnist test labels- Parameters:
set- the emnist subset to download- Returns:
-
emnistTest
public static DataSetResource emnistTest(EMnistSet set)
The emnist test labels- Parameters:
set- the emnist subset to download- Returns:
-
mnistTrain
public static DataSetResource mnistTrain(File topLevelDir)
The mnist training set- Parameters:
topLevelDir- the top level directory ot use- Returns:
-
mnistTrain
public static DataSetResource mnistTrain()
The mnist training input data with a default directory of:DL4JResources.getBaseDirectory()- Returns:
-
mnistTest
public static DataSetResource mnistTest(File topLevelDir)
The mnist test images- Parameters:
topLevelDir- the top level directory to download to- Returns:
-
mnistTest
public static DataSetResource mnistTest()
The mnist test set input with a top level directory of:DL4JResources.getBaseDirectory()- Returns:
-
mnistTrainLabels
public static DataSetResource mnistTrainLabels(File topLevelDir)
The mnist training labels- Parameters:
topLevelDir- the top level directory to download to- Returns:
-
mnistTrainLabels
public static DataSetResource mnistTrainLabels()
The mnist train labels with a top level directory of:DL4JResources.getBaseDirectory()- Returns:
-
mnistTestLabels
public static DataSetResource mnistTestLabels(File topLevelDir)
The mnist test labels- Parameters:
topLevelDir- the top level directory to download to- Returns:
-
mnistTestLabels
public static DataSetResource mnistTestLabels()
The mnist test set labels with a top level directory of:DL4JResources.getBaseDirectory()- Returns:
-
lfwFullLabels
public static DataSetResource lfwFullLabels(File topLevelDir)
Labels for the LFW full dataset- Parameters:
topLevelDir- the top level directory to download to- Returns:
-
lfwFullData
public static DataSetResource lfwFullData(File topLevelDir)
Input images for the LFW full dataset- Parameters:
topLevelDir- the top level directory to download to- Returns:
-
lfwSubData
public static DataSetResource lfwSubData(File topLevelDir)
Input images for the LFW smaller dataset- Parameters:
topLevelDir- the top level directory to download to- Returns:
-
cifar10
public static DataSetResource cifar10(File topLevelDir)
The cifar10 dataset- Parameters:
topLevelDir- the top level directory to download to- Returns:
-
lfwFullLabels
public static DataSetResource lfwFullLabels()
Input labels for the LFW full dataset with a top level directory of:LFWResourceConstants.LFW_FULL_DIR- Returns:
-
lfwFullData
public static DataSetResource lfwFullData()
Input images for the LFW full dataset with a top level directory of:LFWResourceConstants.LFW_FULL_DIR- Returns:
-
lfwSubData
public static DataSetResource lfwSubData()
Input images for the LFW smaller dataset with a top level directory of:LFWResourceConstants.LFW_SUB_DIR- Returns:
-
cifar10
public static DataSetResource cifar10()
The cifar 10 dataset with a default directory of:CifarResourceConstants.CIFAR_DEFAULT_DIR- Returns:
-
-