chainer.iterators.OrderSampler¶
-
class
chainer.iterators.OrderSampler[source]¶ Base class of all order samplers.
Every order sampler subclass has to provide a method
__call__(). This method is called by an iterator before a new epoch, and it should return a new index order for the next epoch.Methods
-
__call__(current_order, current_position)[source]¶ Sample the next order.
- Parameters
current_order (numpy.ndarray) – 1-D array of indices. The length should be the same as the dataset to sample data from.
current_position (int) – The current position of an iterator.
- Returns
1-D array of indices. This is the order in which examples are sampled from a dataset in the next epoch.
- Return type
-
__eq__(value, /)¶ Return self==value.
-
__ne__(value, /)¶ Return self!=value.
-
__lt__(value, /)¶ Return self<value.
-
__le__(value, /)¶ Return self<=value.
-
__gt__(value, /)¶ Return self>value.
-
__ge__(value, /)¶ Return self>=value.
-