Skip to content

Latest commit

 

History

History
35 lines (23 loc) · 1.13 KB

iterators.rst

File metadata and controls

35 lines (23 loc) · 1.13 KB

chainer.iterators

Iterator

Chainer provides some iterators that implement typical strategies to create mini-batches by iterating over datasets. ~chainer.iterators.SerialIterator is the simplest one, which extracts mini-batches in the main thread. ~chainer.iterators.MultiprocessIterator and ~chainer.iterators.MultithreadIterator are parallelized versions of ~chainer.iterators.SerialIterator. They maintain worker subprocesses and subthreads, respectively, to load the next mini-batch in parallel.

chainer.iterators.SerialIterator chainer.iterators.MultiprocessIterator chainer.iterators.MultithreadIterator chainer.iterators.DaliIterator

Order sampler examples

An Iterator iterates over a dataset according to an order represented by a 1-D array of indices. Order samplers are callables that are used by those iterators to generate this array.

chainer.iterators.OrderSampler chainer.iterators.ShuffleOrderSampler