|
Java example source code file (SamplingTest.java)
The SamplingTest.java Java example source codepackage org.deeplearning4j.datasets.iterator; import static org.junit.Assert.*; import org.nd4j.linalg.dataset.api.iterator.DataSetIterator; import org.deeplearning4j.datasets.iterator.impl.MnistDataSetIterator; import org.junit.Test; /** * @author Adam Gibson */ public class SamplingTest { @Test public void testSample() throws Exception { DataSetIterator iter = new MnistDataSetIterator(10,10); //batch size and total DataSetIterator sampling = new SamplingDataSetIterator(iter.next(),10,10); assertEquals(sampling.next().numExamples(),10); } } Other Java examples (source code examples)Here is a short list of links related to this Java SamplingTest.java source code file: |
... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
Copyright 1998-2021 Alvin Alexander, alvinalexander.com
All Rights Reserved.
A percentage of advertising revenue from
pages under the /java/jwarehouse
URI on this website is
paid back to open source projects.