Class RandomMultiDataSetIterator
- java.lang.Object
-
- org.deeplearning4j.datasets.iterator.RandomMultiDataSetIterator
-
- All Implemented Interfaces:
Serializable,Iterator<MultiDataSet>,MultiDataSetIterator
public class RandomMultiDataSetIterator extends Object implements MultiDataSetIterator
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classRandomMultiDataSetIterator.Builderstatic classRandomMultiDataSetIterator.Values
-
Constructor Summary
Constructors Constructor Description RandomMultiDataSetIterator(int numMiniBatches, @NonNull List<org.nd4j.common.primitives.Triple<long[],Character,RandomMultiDataSetIterator.Values>> features, @NonNull List<org.nd4j.common.primitives.Triple<long[],Character,RandomMultiDataSetIterator.Values>> labels)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanasyncSupported()static INDArraygenerate(long[] shape, char order, RandomMultiDataSetIterator.Values values)Generate a random array with the specified shape and orderstatic INDArraygenerate(long[] shape, RandomMultiDataSetIterator.Values values)Generate a random array with the specified shapebooleanhasNext()MultiDataSetnext()MultiDataSetnext(int i)voidremove()voidreset()booleanresetSupported()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Iterator
forEachRemaining
-
Methods inherited from interface org.nd4j.linalg.dataset.api.iterator.MultiDataSetIterator
getPreProcessor, setPreProcessor
-
-
-
-
Constructor Detail
-
RandomMultiDataSetIterator
public RandomMultiDataSetIterator(int numMiniBatches, @NonNull @NonNull List<org.nd4j.common.primitives.Triple<long[],Character,RandomMultiDataSetIterator.Values>> features, @NonNull @NonNull List<org.nd4j.common.primitives.Triple<long[],Character,RandomMultiDataSetIterator.Values>> labels)- Parameters:
numMiniBatches- Number of minibatches per epochfeatures- Each triple in the list specifies the shape, array order and type of values for the features arrayslabels- Each triple in the list specifies the shape, array order and type of values for the labels arrays
-
-
Method Detail
-
next
public MultiDataSet next(int i)
- Specified by:
nextin interfaceMultiDataSetIterator
-
resetSupported
public boolean resetSupported()
- Specified by:
resetSupportedin interfaceMultiDataSetIterator
-
asyncSupported
public boolean asyncSupported()
- Specified by:
asyncSupportedin interfaceMultiDataSetIterator
-
reset
public void reset()
- Specified by:
resetin interfaceMultiDataSetIterator
-
hasNext
public boolean hasNext()
- Specified by:
hasNextin interfaceIterator<MultiDataSet>
-
next
public MultiDataSet next()
- Specified by:
nextin interfaceIterator<MultiDataSet>
-
remove
public void remove()
- Specified by:
removein interfaceIterator<MultiDataSet>
-
generate
public static INDArray generate(long[] shape, RandomMultiDataSetIterator.Values values)
Generate a random array with the specified shape- Parameters:
shape- Shape of the arrayvalues- Values to fill the array with- Returns:
- Random array of specified shape + contents
-
generate
public static INDArray generate(long[] shape, char order, RandomMultiDataSetIterator.Values values)
Generate a random array with the specified shape and order- Parameters:
shape- Shape of the arrayorder- Order of array ('c' or 'f')values- Values to fill the array with- Returns:
- Random array of specified shape + contents
-
-