How it works...
In step 1, we created an iterator using AsyncMultiDataSetIterator. We can use AsyncMultiDataSetIterator or AsyncDataSetIterator to create asynchronous iterators. There are multiple ways in which you can configure an AsyncMultiDataSetIterator. There are multiple ways to create AsyncMultiDataSetIterator by passing further attributes such as queSize (the number of mini-batches that can be prefetched at once) and useWorkSpace (a Boolean type indicating whether workspace configuration should be used). While using AsyncDataSetIterator, we use the current dataset before calling next() to get the next dataset. Also note that we should not store datasets without the detach() call. If you do, then the memory used by INDArray data inside ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access