.cacheMode(CacheMode.DEVICE)
)Y = a*X+b
.ParallelWrapper
or ParallelInference
..cudnnAlgoMode(ConvolutionLayer.AlgoMode.PREFER_FASTEST)
configuration on convolution layers RnnOutputLayer
) labels. Otherwise, use 'c' ordered arrays. This is for faster memory access.Xmx
to? That depends on how much RAM is on your computer. In general, allocate as much heap space as you think the JVM will need to get work done. Let’s say you’re on a 16G RAM laptop — allocate 8G of RAM to the JVM. A sound minimum on laptops with less RAM would be 3g, soXms
should equal Xmx
. If they are unequal, the JVM will progressively allocate more memory as needed until it reaches the max, and that process of gradual allocation slows things down. You want to pre-allocate it at the beginning. So.bash_profile
file, which adds environmental variables to bash. To see those variables, enter env
in the command line. To add more heap space, enter this command in your console:DatasetIterator
you create takes another 8 bytes.Xmx
and works extensively with off-heap memory. The off-heap memory will not surpass the amount of heap space you specify.dl4j-examples
repo, we don't make the ETL asynchronous, because the point of examples is to keep them simple. But for real-world problems, you need asynchronous ETL, and we'll show you how to do it with examples.DatasetIterator
hides the complexity of loading data on disk. The code for using any Datasetiterator will always be the same, invoking looks the same, but they work differently.AsyncDataSetIterator
is what you would use most of the time. It's described in the Javadoc here.AsyncMultiDataSetIterator
, described in the Javadoc here.prefetchSize
is another parameter to set. Normal batch size might be 1000 examples, but if you set prefetchSize
to 3, it would pre-fetch 3,000 instances.fit
, you're recreating a dataset, over and over again. We allow it to happen for ease of use, but we can show you how to speed things up. There are ways to make it just as fast.Recordreaderdatasetiterator
talks to Datavec and outputs datasets for DL4J.