提交 b524724d authored 作者: Frederic Bastien's avatar Frederic Bastien

Tell that fastmath can give nan and show it less.

上级 32d27441
...@@ -51,7 +51,7 @@ Environment Variables ...@@ -51,7 +51,7 @@ Environment Variables
.. code-block:: bash .. code-block:: bash
THEANO_FLAGS='floatX=float32,device=gpu0,nvcc.fastmath=True' python <myscript>.py THEANO_FLAGS='floatX=float32,device=gpu0,lib.cnmem=1' python <myscript>.py
If a value is defined several times in ``THEANO_FLAGS``, If a value is defined several times in ``THEANO_FLAGS``,
the right-most definition is used. So, for instance, if the right-most definition is used. So, for instance, if
...@@ -72,15 +72,15 @@ Environment Variables ...@@ -72,15 +72,15 @@ Environment Variables
floatX = float32 floatX = float32
device = gpu0 device = gpu0
[nvcc] [lib]
fastmath = True cnmem = True
Configuration attributes that are available directly in ``config`` Configuration attributes that are available directly in ``config``
(e.g. ``config.device``, ``config.mode``) should be defined in the (e.g. ``config.device``, ``config.mode``) should be defined in the
``[global]`` section. ``[global]`` section.
Attributes from a subsection of ``config`` (e.g. ``config.nvcc.fastmath``, Attributes from a subsection of ``config`` (e.g. ``config.lib.cnmem``,
``config.blas.ldflags``) should be defined in their corresponding section ``dnn.conv.algo_fwd``) should be defined in their corresponding section
(e.g. ``[nvcc]``, ``[blas]``). (e.g. ``[nvcc]``, ``[dnn.conv]``).
Multiple configuration files can be specified by separating them with ':' Multiple configuration files can be specified by separating them with ':'
characters (as in $PATH). Multiple configuration files will be merged, characters (as in $PATH). Multiple configuration files will be merged,
...@@ -644,7 +644,8 @@ import theano and print the config variable, as in: ...@@ -644,7 +644,8 @@ import theano and print the config variable, as in:
<http://docs.nvidia.com/cuda/cuda-compiler-driver-nvcc/#options-for-steering-cuda-compilation>`_) <http://docs.nvidia.com/cuda/cuda-compiler-driver-nvcc/#options-for-steering-cuda-compilation>`_)
mode for compiled cuda code which makes div and sqrt faster at the mode for compiled cuda code which makes div and sqrt faster at the
cost of precision. This also disables support for denormal cost of precision. This also disables support for denormal
numbers. numbers. This can cause NaN. So if you have NaN and use this flag,
try to disable it.
.. attribute:: config.optimizer_excluding .. attribute:: config.optimizer_excluding
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论