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

Changed default value of config.cast_policy from 'custom' to 'numpy+floatX'

上级 686ab9fe
...@@ -156,18 +156,19 @@ import theano and print the config variable, as in: ...@@ -156,18 +156,19 @@ import theano and print the config variable, as in:
String value: either 'numpy+floatX', 'numpy' or 'custom' String value: either 'numpy+floatX', 'numpy' or 'custom'
Default: 'custom' Default: 'numpy+floatX'
This specifies how data types are implicitly figured out in Theano, e.g. for This specifies how data types are implicitly figured out in Theano, e.g. for
constants or in the results of arithmetic operations. The current default constants or in the results of arithmetic operations. The 'custom' value
value ('custom') corresponds to a set of custom rules originally used 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 Theano (which can be partially customized, see e.g. the in-code help of
``tensor.NumpyAutocaster``). However the 'custom' option will be ``tensor.NumpyAutocaster``), and is now deprecated.
deprecated in a future release of Theano. The 'numpy' setting attempts to The 'numpy' setting attempts to
mimic the numpy casting rules. 'numpy+floatX' does the same, except that 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`` it prefers to use float32 numbers instead of float64 when ``config.floatX``
is set to 'float32' (this will become the default value in a future is set to 'float32'.
release of Theano). Note that both 'numpy' and 'numpy+floatX' Note that both 'numpy' and 'numpy+floatX'
behave differently from numpy on purpose in the following situations: behave differently from numpy on purpose in the following situations:
* Depending on the value of ``config.int_division``, the resulting type * Depending on the value of ``config.int_division``, the resulting type
of a division of integer types with the ``/`` operator may not match of a division of integer types with the ``/`` operator may not match
......
...@@ -16,8 +16,8 @@ AddConfigVar('floatX', ...@@ -16,8 +16,8 @@ AddConfigVar('floatX',
) )
AddConfigVar('cast_policy', AddConfigVar('cast_policy',
"Rules for implicit type casting (until further notice, do not modify within a script, and clear your Theano cache whenever it is modified)", "Rules for implicit type casting",
EnumStr('custom', 'numpy+floatX', 'numpy'), EnumStr('numpy+floatX', 'numpy', 'default'),
) )
AddConfigVar('int_division', AddConfigVar('int_division',
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论