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.

__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.