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.dtype
is mixed16, this option is used. If this value isNone
, float16 is used.
- Returns
If
dtype
is notNone
, it returns the dtype normalized bynumpy.dtype()
. Otherwise, it returnschainer.config.dtype
(see Configuring Chainer) normalized as well. Whenchainer.config.dtype
ismixed16
andmap_mixed16
is specified, it returns the normalized version ofmap_mixed16
.