public class LFWLoader extends BaseImageLoader implements Serializable
| Modifier and Type | Field and Description |
|---|---|
static int |
CHANNELS |
static String |
DATA_URL |
String |
dataFile |
protected File |
fullDir |
static int |
HEIGHT |
static String |
LABEL_URL |
String |
labelFile |
static Map<String,String> |
lfwData |
static Map<String,String> |
lfwLabel |
static Map<String,String> |
lfwSubsetData |
String |
localDir |
String |
localSubDir |
static int |
NUM_IMAGES |
static int |
NUM_LABELS |
protected int |
numExamples |
protected int |
numLabels |
protected String |
regexPattern |
static int |
SUB_NUM_IMAGES |
static int |
SUB_NUM_LABELS |
static String |
SUBSET_URL |
String |
subsetFile |
protected boolean |
useSubset |
static int |
WIDTH |
ALLOWED_FORMATS, BASE_DIR, centerCropIfNeeded, channels, height, log, rng, width| Constructor and Description |
|---|
LFWLoader() |
LFWLoader(boolean useSubset) |
LFWLoader(String path) |
LFWLoader(String localDir,
boolean useSubset) |
| Modifier and Type | Method and Description |
|---|---|
org.nd4j.linalg.api.ndarray.INDArray |
asMatrix(File f) |
org.nd4j.linalg.api.ndarray.INDArray |
asMatrix(InputStream inputStream) |
org.nd4j.linalg.api.ndarray.INDArray |
asRowVector(File f) |
org.nd4j.linalg.api.ndarray.INDArray |
asRowVector(InputStream inputStream) |
void |
generateLfwMaps() |
org.canova.api.records.reader.RecordReader |
getRecordReader() |
org.canova.api.records.reader.RecordReader |
getRecordReader(int numExamples) |
org.canova.api.records.reader.RecordReader |
getRecordReader(int numExamples,
int numCategories) |
org.canova.api.records.reader.RecordReader |
getRecordReader(int height,
int width,
int channels) |
org.canova.api.records.reader.RecordReader |
getRecordReader(int height,
int width,
int channels,
boolean appendLabel,
String regexPattern) |
org.canova.api.records.reader.RecordReader |
getRecordReader(int numExamples,
int height,
int width,
int channels) |
org.canova.api.records.reader.RecordReader |
getRecordReader(int numExamples,
int height,
int width,
int channels,
int numLabels,
Random rng) |
org.canova.api.records.reader.RecordReader |
getRecordReader(int numExamples,
int height,
int width,
int channels,
Random rng) |
boolean |
imageFilesExist() |
void |
load() |
downloadAndUntar, getAllowedFormatspublic static final int NUM_IMAGES
public static final int NUM_LABELS
public static final int SUB_NUM_IMAGES
public static final int SUB_NUM_LABELS
public static final int CHANNELS
public static final int HEIGHT
public static final int WIDTH
public static final String DATA_URL
public static final String LABEL_URL
public static final String SUBSET_URL
public String dataFile
public String labelFile
public String subsetFile
public String localDir
public String localSubDir
protected File fullDir
protected String regexPattern
protected boolean useSubset
protected int numExamples
protected int numLabels
public LFWLoader(String localDir, boolean useSubset)
public LFWLoader(boolean useSubset)
public LFWLoader(String path)
public LFWLoader()
public org.nd4j.linalg.api.ndarray.INDArray asRowVector(File f) throws IOException
asRowVector in class BaseImageLoaderIOExceptionpublic org.nd4j.linalg.api.ndarray.INDArray asRowVector(InputStream inputStream) throws IOException
asRowVector in class BaseImageLoaderIOExceptionpublic org.nd4j.linalg.api.ndarray.INDArray asMatrix(File f) throws IOException
asMatrix in class BaseImageLoaderIOExceptionpublic org.nd4j.linalg.api.ndarray.INDArray asMatrix(InputStream inputStream) throws IOException
asMatrix in class BaseImageLoaderIOExceptionpublic void generateLfwMaps()
public void load()
public boolean imageFilesExist()
public org.canova.api.records.reader.RecordReader getRecordReader()
public org.canova.api.records.reader.RecordReader getRecordReader(int height,
int width,
int channels)
public org.canova.api.records.reader.RecordReader getRecordReader(int numExamples)
public org.canova.api.records.reader.RecordReader getRecordReader(int numExamples,
int numCategories)
public org.canova.api.records.reader.RecordReader getRecordReader(int numExamples,
int height,
int width,
int channels)
public org.canova.api.records.reader.RecordReader getRecordReader(int numExamples,
int height,
int width,
int channels,
Random rng)
public org.canova.api.records.reader.RecordReader getRecordReader(int numExamples,
int height,
int width,
int channels,
int numLabels,
Random rng)
public org.canova.api.records.reader.RecordReader getRecordReader(int height,
int width,
int channels,
boolean appendLabel,
String regexPattern)
Copyright © 2016. All rights reserved.