chainer_chemistry.iterators.IndexIterator

class chainer_chemistry.iterators.IndexIterator(index_list, shuffle=True, num=0)[source]

Index iterator

IndexIterator is used internally in BalancedSerialIterator, as each label’s index iterator

Args:

index_list (list): list of int which represents indices. shuffle (bool): shuffle flag. If True, indices specified by

index_list will be randomly shuffled.
num (int): number of indices to be extracted when ___next___ is
called.
__init__(index_list, shuffle=True, num=0)[source]

Initialize self. See help(type(self)) for accurate signature.

Methods

__init__(index_list[, shuffle, num]) Initialize self.
finalize() Finalizes the iterator and possibly releases the resources.
get_next_indices(num) get next indices
next() Python2 alternative of __next__.
serialize(serializer) Serializes the internal state of the iterator.
update_current_index_list()