chainer.get_dtype(dtype=None, map_mixed16=None)[source]

Resolves Chainer’s default dtype.

  • dtype – Dtype specifier. If this value is specified (not None), this function returns the dtype object corresponding to it.

  • map_mixed16 – Dtype specifier. When chainer.config.dtype is mixed16, this option is used. If this value is None, float16 is used.


If dtype is not None, it returns the dtype normalized by numpy.dtype(). Otherwise, it returns chainer.config.dtype (see Configuring Chainer) normalized as well. When chainer.config.dtype is mixed16 and map_mixed16 is specified, it returns the normalized version of map_mixed16.