Search in sources :

Example 6 with TestDataSetConsumer

use of org.deeplearning4j.util.TestDataSetConsumer in project deeplearning4j by deeplearning4j.

the class MultipleEpochsIteratorTest method testMEDIWithLoad1.

@Test
public void testMEDIWithLoad1() throws Exception {
    ExistingDataSetIterator iter = new ExistingDataSetIterator(new IterableWithoutException(100));
    MultipleEpochsIterator iterator = new MultipleEpochsIterator(10, iter, 24);
    TestDataSetConsumer consumer = new TestDataSetConsumer(iterator, 1);
    long num = consumer.consumeWhileHasNext(true);
    assertEquals(10 * 100, num);
}
Also used : TestDataSetConsumer(org.deeplearning4j.util.TestDataSetConsumer) Test(org.junit.Test)

Aggregations

TestDataSetConsumer (org.deeplearning4j.util.TestDataSetConsumer)6 Test (org.junit.Test)6 DataSet (org.nd4j.linalg.dataset.DataSet)1