public class DL4JResources extends Object
DL4J_RESOURCES_DIR_PROPERTY system property, org.deeplearning4j.resources.directorysetBaseDirectory(File) at runtime| Modifier and Type | Field and Description |
|---|---|
static String |
DL4J_BASE_URL_PROPERTY
Deprecated.
|
static String |
DL4J_RESOURCES_DIR_PROPERTY
Deprecated.
|
| Constructor and Description |
|---|
DL4JResources() |
| Modifier and Type | Method and Description |
|---|---|
static File |
getBaseDirectory() |
static String |
getBaseDownloadURL() |
static File |
getDirectory(ResourceType resourceType,
String resourceName)
Get the storage location for the specified resource type and resource name
|
static URL |
getURL(String relativeToBase)
Get the URL relative to the base URL.
For example, if baseURL is "http://blob.deeplearning4j.org/", and relativeToBase is "/datasets/iris.dat" this simply returns "http://blob.deeplearning4j.org/datasets/iris.dat" |
static String |
getURLString(String relativeToBase)
Get the URL relative to the base URL as a String.
For example, if baseURL is "http://blob.deeplearning4j.org/", and relativeToBase is "/datasets/iris.dat" this simply returns "http://blob.deeplearning4j.org/datasets/iris.dat" |
static void |
resetBaseDirectoryLocation()
Reset to the default directory, or the directory set via the
DL4JSystemProperties.DL4J_RESOURCES_DIR_PROPERTY system property,
org.deeplearning4j.resources.directory |
static void |
setBaseDirectory(File f)
Set the base directory for local storage of files.
|
static void |
setBaseDownloadURL(String baseDownloadURL)
Set the base download URL for (most) DL4J datasets and models.
This usually doesn't need to be set manually unless there is some issue with the default location |
@Deprecated public static final String DL4J_RESOURCES_DIR_PROPERTY
DL4JSystemProperties.DL4J_RESOURCES_DIR_PROPERTY@Deprecated public static final String DL4J_BASE_URL_PROPERTY
DL4JSystemProperties.DL4J_RESOURCES_BASE_URL_PROPERTYpublic static void setBaseDownloadURL(@NonNull
String baseDownloadURL)
baseDownloadURL - Base download URL to set. For example, http://blob.deeplearning4j.org/public static String getBaseDownloadURL()
public static URL getURL(String relativeToBase) throws MalformedURLException
relativeToBase - Relative URLMalformedURLException - For bad URLpublic static String getURLString(String relativeToBase)
relativeToBase - Relative URLMalformedURLException - For bad URLpublic static void resetBaseDirectoryLocation()
DL4JSystemProperties.DL4J_RESOURCES_DIR_PROPERTY system property,
org.deeplearning4j.resources.directorypublic static void setBaseDirectory(@NonNull
File f)
new File(System.getProperty("user.home"), ".deeplearning4j")f - Base directory to use for resourcespublic static File getBaseDirectory()
public static File getDirectory(ResourceType resourceType, String resourceName)
resourceType - Type of resourceresourceName - Name of the resourceCopyright © 2019. All rights reserved.