class chainer.dataset.Converter[source]

Base class of converters.

Converters receive batched data retrieved from iterators and perform arbitrary transforms as well as device transfer.

Implementation should override the __call__ method.

See also

chainer.dataset.converter() — a decorator to turn a converter function into a Converter instance.


__call__(batch, device)[source]

Performs conversion.

  • batch – A batch. The type and value are arbitrary, depending on usage.

  • device (Device) – Device to which the converter is expected to send the batch.

Returns: A converted batch.


Return self==value.


Return self!=value.


Return self<value.


Return self<=value.


Return self>value.


Return self>=value.