public RecordReader getRecordReader(int batchSize, int numExamples, int[] imgDim, boolean train, double splitTrainTest, Random rng) { return getRecordReader(numExamples, batchSize, imgDim, useSubset ? SUB_NUM_LABELS : NUM_LABELS, LABEL_PATTERN, train, splitTrainTest, rng); }
public RecordReader getRecordReader(int batchSize, int numExamples, PathLabelGenerator labelGenerator, boolean train, double splitTrainTest, Random rng) { return getRecordReader(numExamples, batchSize, new int[] {height, width, channels}, useSubset ? SUB_NUM_LABELS : NUM_LABELS, labelGenerator, train, splitTrainTest, rng); }
public RecordReader getRecordReader(int batchSize, int numExamples, int numLabels, Random rng) { return getRecordReader(numExamples, batchSize, new int[] {height, width, channels}, numLabels, LABEL_PATTERN, true, 1, rng); }
public RecordReader getRecordReader(int batchSize, int numExamples, int[] imgDim, PathLabelGenerator labelGenerator, boolean train, double splitTrainTest, Random rng) { return getRecordReader(numExamples, batchSize, imgDim, useSubset ? SUB_NUM_LABELS : NUM_LABELS, labelGenerator, train, splitTrainTest, rng); }
public RecordReader getRecordReader(int numExamples) { return getRecordReader(numExamples, numExamples, new int[] {height, width, channels}, useSubset ? SUB_NUM_LABELS : NUM_LABELS, LABEL_PATTERN, true, 1, new Random(System.currentTimeMillis())); }
public RecordReader getRecordReader(int batchSize, int numExamples, boolean train, double splitTrainTest) { return getRecordReader(numExamples, batchSize, new int[] {height, width, channels}, useSubset ? SUB_NUM_LABELS : NUM_LABELS, LABEL_PATTERN, train, splitTrainTest, new Random(System.currentTimeMillis())); }
/** * Create LFW data specific iterator * @param batchSize the batch size of the examples * @param numExamples the overall number of examples * @param imgDim an array of height, width and channels * @param numLabels the overall number of examples * @param useSubset use a subset of the LFWDataSet * @param labelGenerator path label generator to use * @param train true if use train value * @param splitTrainTest the percentage to split data for train and remainder goes to test * @param imageTransform how to transform the image * @param rng random number to lock in batch shuffling * */ public LFWDataSetIterator(int batchSize, int numExamples, int[] imgDim, int numLabels, boolean useSubset, PathLabelGenerator labelGenerator, boolean train, double splitTrainTest, ImageTransform imageTransform, Random rng) { super(new LFWLoader(imgDim, imageTransform, useSubset).getRecordReader(batchSize, numExamples, imgDim, numLabels, labelGenerator, train, splitTrainTest, rng), batchSize, 1, numLabels); }
/** * Create LFW data specific iterator * @param batchSize the batch size of the examples * @param numExamples the overall number of examples * @param imgDim an array of height, width and channels * @param numLabels the overall number of examples * @param useSubset use a subset of the LFWDataSet * @param labelGenerator path label generator to use * @param train true if use train value * @param splitTrainTest the percentage to split data for train and remainder goes to test * @param imageTransform how to transform the image * @param rng random number to lock in batch shuffling * */ public LFWDataSetIterator(int batchSize, int numExamples, int[] imgDim, int numLabels, boolean useSubset, PathLabelGenerator labelGenerator, boolean train, double splitTrainTest, ImageTransform imageTransform, Random rng) { super(new LFWLoader(imgDim, imageTransform, useSubset).getRecordReader(batchSize, numExamples, imgDim, numLabels, labelGenerator, train, splitTrainTest, rng), batchSize, 1, numLabels); }