提交 e9ff85cf authored 作者: Olivier Delalleau's avatar Olivier Delalleau

Removed cast_policy==numpy: would not be able to get it to work well fast enough

上级 28304dce
......@@ -154,7 +154,7 @@ import theano and print the config variable, as in:
.. attribute:: cast_policy
String value: either 'numpy+floatX', 'numpy' or 'custom'
String value: either 'numpy+floatX' or 'custom'
Default: 'numpy+floatX'
......@@ -163,13 +163,12 @@ import theano and print the config variable, as in:
corresponds to a set of custom rules originally used in
Theano (which can be partially customized, see e.g. the in-code help of
``tensor.NumpyAutocaster``), and is now deprecated.
The 'numpy' setting attempts to
mimic the numpy casting rules. The default value ('numpy+floatX') does
the same, except that
it prefers to use float32 numbers instead of float64 when ``config.floatX``
is set to 'float32'.
Note that both 'numpy' and 'numpy+floatX'
behave differently from numpy on purpose in the following situations:
The 'numpy+floatX' setting attempts to mimic the numpy casting rules,
although it prefers to use float32 numbers instead of float64 when
``config.floatX`` is set to 'float32' and the user uses data that is not
explicitly typed as float64 (e.g. regular Python floats).
Note that 'numpy+floatX' currently also behaves differently from numpy in
the following situations:
* Depending on the value of ``config.int_division``, the resulting type
of a division of integer types with the ``/`` operator may not match
that of numpy.
......
......@@ -17,7 +17,15 @@ AddConfigVar('floatX',
AddConfigVar('cast_policy',
"Rules for implicit type casting",
EnumStr('numpy+floatX', 'numpy', 'custom'),
EnumStr('numpy+floatX', 'custom',
# The 'numpy' policy was originally planned to provide a smooth
# transition from numpy. It was meant to behave the same as
# numpy+floatX, but keeping float64 when numpy would. However
# the current implementation of some cast mechanisms makes it
# a bit more complex to add than what was expected, so it is
# currently not available.
#numpy,
),
)
AddConfigVar('int_division',
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论