prfmodel.utils.get_dtype¶
- prfmodel.utils.get_dtype(dtype: str | None) str¶
Get the (default) dtype.
Utility function to pass through a dtype or get the default dtype set by
keras.config.floatx().- Parameters:
dtype (str or None) – The dtype to pass through. If None, returns
keras.config.floatx().- Returns:
The dtype.
- Return type:
- Raises:
ValueError – When dtype is not of the values defined in
DTYPES. Keras’bfloat16is currently not supported, so this also raises when keras.config.floatx() == ‘bfloat16’.