chainer.get_dtype¶
- chainer.get_dtype(dtype=None, map_mixed16=None)[source]¶
Resolves Chainer’s default dtype.
- Parameters
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.dtypeis mixed16, this option is used. If this value isNone, float16 is used.
- Returns
If
dtypeis notNone, it returns the dtype normalized bynumpy.dtype(). Otherwise, it returnschainer.config.dtype(see Configuring Chainer) normalized as well. Whenchainer.config.dtypeismixed16andmap_mixed16is specified, it returns the normalized version ofmap_mixed16.