Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
020fc625
提交
020fc625
authored
4月 08, 2015
作者:
Mohammad Pezeshki
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
configdefaults.py in pep8
上级
f7a5312c
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
190 行增加
和
168 行删除
+190
-168
configdefaults.py
theano/configdefaults.py
+190
-168
没有找到文件。
theano/configdefaults.py
浏览文件 @
020fc625
...
@@ -24,7 +24,7 @@ def floatX_convert(s):
...
@@ -24,7 +24,7 @@ def floatX_convert(s):
AddConfigVar
(
'floatX'
,
AddConfigVar
(
'floatX'
,
"Default floating-point precision for python casts"
,
"Default floating-point precision for python casts"
,
EnumStr
(
'float64'
,
'float32'
,
convert
=
floatX_convert
,),
EnumStr
(
'float64'
,
'float32'
,
convert
=
floatX_convert
,),
)
)
AddConfigVar
(
'warn_float64'
,
AddConfigVar
(
'warn_float64'
,
"Do an action when a tensor variable with float64 dtype is"
"Do an action when a tensor variable with float64 dtype is"
...
@@ -32,20 +32,20 @@ AddConfigVar('warn_float64',
...
@@ -32,20 +32,20 @@ AddConfigVar('warn_float64',
" gpu back-end and are slow with gamer GPUs."
,
" gpu back-end and are slow with gamer GPUs."
,
EnumStr
(
'ignore'
,
'warn'
,
'raise'
,
'pdb'
),
EnumStr
(
'ignore'
,
'warn'
,
'raise'
,
'pdb'
),
in_c_key
=
False
,
in_c_key
=
False
,
)
)
AddConfigVar
(
'cast_policy'
,
AddConfigVar
(
'cast_policy'
,
"Rules for implicit type casting"
,
'Rules for implicit type casting'
,
EnumStr
(
'custom'
,
'numpy+floatX'
,
EnumStr
(
'custom'
,
'numpy+floatX'
,
# The 'numpy' policy was originally planned to provide a smooth
# The 'numpy' policy was originally planned to provide a
# transition from numpy. It was meant to behave the same as
# smooth transition from numpy. It was meant to behave the
# numpy+floatX, but keeping float64 when numpy would. However
# same asnumpy+floatX, but keeping float64 when numpy
# the current implementation of some cast mechanisms makes i
t
# would. However the current implementation of some cas
t
# a bit more complex to add than what was expected, so it is
# mechanisms makes it a bit more complex to add than what
#
currently not available.
# was expected, so it is
currently not available.
# numpy,
# numpy,
),
),
)
)
# python 2.* define int / int to return int and int // int to return int.
# python 2.* define int / int to return int and int // int to return int.
# python 3* define int / int to return float and int // int to return int.
# python 3* define int / int to return float and int // int to return int.
...
@@ -53,10 +53,10 @@ AddConfigVar('cast_policy',
...
@@ -53,10 +53,10 @@ AddConfigVar('cast_policy',
# than numpy. When we will do the transition, we should create an int_warn
# than numpy. When we will do the transition, we should create an int_warn
# and floatX_warn option.
# and floatX_warn option.
AddConfigVar
(
'int_division'
,
AddConfigVar
(
'int_division'
,
"What to do when one computes x / y, where both x and y are of "
"What to do when one computes x / y, where both x and y are of "
"integer types"
,
"integer types"
,
EnumStr
(
'int'
,
'raise'
,
'floatX'
),
EnumStr
(
'int'
,
'raise'
,
'floatX'
),
in_c_key
=
False
)
in_c_key
=
False
)
# gpu means let the driver select the gpu. Needed in case of gpu in
# gpu means let the driver select the gpu. Needed in case of gpu in
# exclusive mode.
# exclusive mode.
...
@@ -82,14 +82,14 @@ class DeviceParam(ConfigParam):
...
@@ -82,14 +82,14 @@ class DeviceParam(ConfigParam):
def
__str__
(
self
):
def
__str__
(
self
):
return
'
%
s (cpu, gpu*, opencl*, cuda*) '
%
(
self
.
fullname
,)
return
'
%
s (cpu, gpu*, opencl*, cuda*) '
%
(
self
.
fullname
,)
AddConfigVar
(
'device'
,
AddConfigVar
(
(
"Default device for computations. If gpu*, change the default to try "
'device'
,
"to move computation to it and to put shared variable of float32
"
(
"Default device for computations. If gpu*, change the default to try
"
"on it. Do not use upper case letters, only lower case even if
"
"to move computation to it and to put shared variable of float32
"
"NVIDIA use capital letters."
),
"on it. Do not use upper case letters, only lower case even if "
DeviceParam
(
'cpu'
,
allow_override
=
False
),
"NVIDIA use capital letters."
),
in_c_key
=
False
,
DeviceParam
(
'cpu'
,
allow_override
=
False
)
,
)
in_c_key
=
False
,
)
AddConfigVar
(
'gpuarray.init_device'
,
AddConfigVar
(
'gpuarray.init_device'
,
"""
"""
...
@@ -99,28 +99,31 @@ AddConfigVar('gpuarray.init_device',
...
@@ -99,28 +99,31 @@ AddConfigVar('gpuarray.init_device',
StrParam
(
''
),
StrParam
(
''
),
in_c_key
=
False
)
in_c_key
=
False
)
AddConfigVar
(
'init_gpu_device'
,
AddConfigVar
(
(
"Initialize the gpu device to use, works only if device=cpu. "
'init_gpu_device'
,
"Unlike 'device', setting this option will NOT move computations, "
(
"Initialize the gpu device to use, works only if device=cpu. "
"nor shared variables, to the specified GPU. "
"Unlike 'device', setting this option will NOT move computations, "
"It can be used to run GPU-specific tests on a particular GPU."
),
"nor shared variables, to the specified GPU. "
EnumStr
(
''
,
'gpu'
,
"It can be used to run GPU-specific tests on a particular GPU."
),
EnumStr
(
''
,
'gpu'
,
'gpu0'
,
'gpu1'
,
'gpu2'
,
'gpu3'
,
'gpu0'
,
'gpu1'
,
'gpu2'
,
'gpu3'
,
'gpu4'
,
'gpu5'
,
'gpu6'
,
'gpu7'
,
'gpu4'
,
'gpu5'
,
'gpu6'
,
'gpu7'
,
'gpu8'
,
'gpu9'
,
'gpu10'
,
'gpu11'
,
'gpu8'
,
'gpu9'
,
'gpu10'
,
'gpu11'
,
'gpu12'
,
'gpu13'
,
'gpu14'
,
'gpu15'
,
'gpu12'
,
'gpu13'
,
'gpu14'
,
'gpu15'
,
allow_override
=
False
),
allow_override
=
False
),
in_c_key
=
False
)
in_c_key
=
False
)
AddConfigVar
(
'force_device'
,
AddConfigVar
(
"Raise an error if we can't use the specified device"
,
'force_device'
,
BoolParam
(
False
,
allow_override
=
False
),
"Raise an error if we can't use the specified device"
,
in_c_key
=
False
)
BoolParam
(
False
,
allow_override
=
False
),
in_c_key
=
False
)
AddConfigVar
(
'print_active_device'
,
AddConfigVar
(
"Print active device at when the GPU device is initialized."
,
'print_active_device'
,
BoolParam
(
True
,
allow_override
=
False
),
"Print active device at when the GPU device is initialized."
,
in_c_key
=
False
)
BoolParam
(
True
,
allow_override
=
False
),
in_c_key
=
False
)
# Do not add FAST_RUN_NOGC to this list (nor any other ALL CAPS shortcut).
# Do not add FAST_RUN_NOGC to this list (nor any other ALL CAPS shortcut).
...
@@ -129,11 +132,12 @@ AddConfigVar('print_active_device',
...
@@ -129,11 +132,12 @@ AddConfigVar('print_active_device',
# scalable.
# scalable.
# Also, please be careful not to modify the first item in the enum when adding
# Also, please be careful not to modify the first item in the enum when adding
# new modes, since it is the default mode.
# new modes, since it is the default mode.
AddConfigVar
(
'mode'
,
AddConfigVar
(
"Default compilation mode"
,
'mode'
,
EnumStr
(
'Mode'
,
'ProfileMode'
,
'DebugMode'
,
'FAST_RUN'
,
"Default compilation mode"
,
'FAST_COMPILE'
,
'PROFILE_MODE'
,
'DEBUG_MODE'
),
EnumStr
(
'Mode'
,
'ProfileMode'
,
'DebugMode'
,
'FAST_RUN'
,
in_c_key
=
False
)
'FAST_COMPILE'
,
'PROFILE_MODE'
,
'DEBUG_MODE'
),
in_c_key
=
False
)
param
=
"g++"
param
=
"g++"
...
@@ -209,22 +213,24 @@ AddConfigVar('allow_gc',
...
@@ -209,22 +213,24 @@ AddConfigVar('allow_gc',
in_c_key
=
False
)
in_c_key
=
False
)
# Keep the default optimizer the same as the one for the mode FAST_RUN
# Keep the default optimizer the same as the one for the mode FAST_RUN
AddConfigVar
(
'optimizer'
,
AddConfigVar
(
(
"Default optimizer. If not None, will use this linker with the Mode "
'optimizer'
,
"object (not ProfileMode(deprecated) or DebugMode)"
),
(
"Default optimizer. If not None, will use this linker with the Mode "
EnumStr
(
'fast_run'
,
'merge'
,
'fast_compile'
,
'None'
),
"object (not ProfileMode(deprecated) or DebugMode)"
),
in_c_key
=
False
)
EnumStr
(
'fast_run'
,
'merge'
,
'fast_compile'
,
'None'
),
in_c_key
=
False
)
AddConfigVar
(
'optimizer_verbose'
,
AddConfigVar
(
'optimizer_verbose'
,
"If True, we print all optimization being applied"
,
"If True, we print all optimization being applied"
,
BoolParam
(
False
),
BoolParam
(
False
),
in_c_key
=
False
)
in_c_key
=
False
)
AddConfigVar
(
'on_opt_error'
,
AddConfigVar
(
(
"What to do when an optimization crashes: warn and skip it, raise "
'on_opt_error'
,
"the exception, or fall into the pdb debugger."
),
(
"What to do when an optimization crashes: warn and skip it, raise "
EnumStr
(
'warn'
,
'raise'
,
'pdb'
),
"the exception, or fall into the pdb debugger."
),
in_c_key
=
False
)
EnumStr
(
'warn'
,
'raise'
,
'pdb'
),
in_c_key
=
False
)
def
safe_no_home
(
home
):
def
safe_no_home
(
home
):
...
@@ -239,23 +245,25 @@ def safe_no_home(home):
...
@@ -239,23 +245,25 @@ def safe_no_home(home):
"""
"""
if
home
:
if
home
:
raise
RuntimeError
(
raise
RuntimeError
(
'The `config.home` option has been removed and should not be '
'The `config.home` option has been removed and should not be '
'used anymore. Please set the `config.base_compiledir` option '
'used anymore. Please set the `config.base_compiledir` option '
'instead (for instance to:
%
s)'
%
'instead (for instance to:
%
s)'
%
os
.
path
.
join
(
home
,
'.theano'
))
os
.
path
.
join
(
home
,
'.theano'
))
return
True
return
True
AddConfigVar
(
'home'
,
AddConfigVar
(
"This config option was removed in 0.5: do not use it!"
,
'home'
,
ConfigParam
(
''
,
allow_override
=
False
,
filter
=
safe_no_home
),
"This config option was removed in 0.5: do not use it!"
,
in_c_key
=
False
)
ConfigParam
(
''
,
allow_override
=
False
,
filter
=
safe_no_home
),
in_c_key
=
False
)
AddConfigVar
(
'nocleanup'
,
AddConfigVar
(
"Suppress the deletion of code files that did not compile cleanly"
,
'nocleanup'
,
BoolParam
(
False
),
"Suppress the deletion of code files that did not compile cleanly"
,
in_c_key
=
False
)
BoolParam
(
False
),
in_c_key
=
False
)
AddConfigVar
(
'on_unused_input'
,
AddConfigVar
(
'on_unused_input'
,
"What to do if a variable in the 'inputs' list of "
"What to do if a variable in the 'inputs' list of "
...
@@ -267,40 +275,46 @@ AddConfigVar('on_unused_input',
...
@@ -267,40 +275,46 @@ AddConfigVar('on_unused_input',
# So changing it after import will not modify these global variables.
# So changing it after import will not modify these global variables.
# This could be done differently... but for now we simply prevent it from being
# This could be done differently... but for now we simply prevent it from being
# changed at runtime.
# changed at runtime.
AddConfigVar
(
'tensor.cmp_sloppy'
,
AddConfigVar
(
"Relax tensor._allclose (0) not at all, (1) a bit, (2) more"
,
'tensor.cmp_sloppy'
,
IntParam
(
0
,
lambda
i
:
i
in
(
0
,
1
,
2
),
allow_override
=
False
),
"Relax tensor._allclose (0) not at all, (1) a bit, (2) more"
,
in_c_key
=
False
)
IntParam
(
0
,
lambda
i
:
i
in
(
0
,
1
,
2
),
allow_override
=
False
),
in_c_key
=
False
)
AddConfigVar
(
'tensor.local_elemwise_fusion'
,
(
"Enable or not in fast_run mode(fast_run optimization) the elemwise "
AddConfigVar
(
"fusion optimization"
),
'tensor.local_elemwise_fusion'
,
BoolParam
(
True
),
(
"Enable or not in fast_run mode(fast_run optimization) the elemwise "
in_c_key
=
False
)
"fusion optimization"
),
BoolParam
(
True
),
AddConfigVar
(
'gpu.local_elemwise_fusion'
,
in_c_key
=
False
)
(
"Enable or not in fast_run mode(fast_run optimization) the gpu "
"elemwise fusion optimization"
),
AddConfigVar
(
BoolParam
(
True
),
'gpu.local_elemwise_fusion'
,
in_c_key
=
False
)
(
"Enable or not in fast_run mode(fast_run optimization) the gpu "
"elemwise fusion optimization"
),
BoolParam
(
True
),
in_c_key
=
False
)
# http://developer.amd.com/CPU/LIBRARIES/LIBM/Pages/default.aspx
# http://developer.amd.com/CPU/LIBRARIES/LIBM/Pages/default.aspx
AddConfigVar
(
'lib.amdlibm'
,
AddConfigVar
(
"Use amd's amdlibm numerical library"
,
'lib.amdlibm'
,
BoolParam
(
False
))
"Use amd's amdlibm numerical library"
,
BoolParam
(
False
))
AddConfigVar
(
'gpuelemwise.sync'
,
"when true, wait that the gpu fct finished and check it error code."
,
AddConfigVar
(
BoolParam
(
True
),
'gpuelemwise.sync'
,
in_c_key
=
False
)
"when true, wait that the gpu fct finished and check it error code."
,
BoolParam
(
True
),
AddConfigVar
(
'traceback.limit'
,
in_c_key
=
False
)
"The number of stack to trace. -1 mean all."
,
# We default to 6 to be able to know where v1 + v2 is created in the
AddConfigVar
(
# user script. The bigger this number is, the more run time it takes.
'traceback.limit'
,
# We need to default to 7 to support theano.tensor.tensor(...).
"The number of stack to trace. -1 mean all."
,
IntParam
(
7
),
# We default to 6 to be able to know where v1 + v2 is created in the
in_c_key
=
False
)
# user script. The bigger this number is, the more run time it takes.
# We need to default to 7 to support theano.tensor.tensor(...).
IntParam
(
7
),
in_c_key
=
False
)
AddConfigVar
(
'experimental.mrg'
,
AddConfigVar
(
'experimental.mrg'
,
"Another random number generator that work on the gpu"
,
"Another random number generator that work on the gpu"
,
...
@@ -329,14 +343,14 @@ AddConfigVar('numpy.seterr_all',
...
@@ -329,14 +343,14 @@ AddConfigVar('numpy.seterr_all',
"by the following flags: seterr_divide, seterr_over, "
"by the following flags: seterr_divide, seterr_over, "
"seterr_under and seterr_invalid."
),
"seterr_under and seterr_invalid."
),
EnumStr
(
'ignore'
,
'warn'
,
'raise'
,
'call'
,
'print'
,
'log'
,
'None'
,
EnumStr
(
'ignore'
,
'warn'
,
'raise'
,
'call'
,
'print'
,
'log'
,
'None'
,
allow_override
=
False
),
allow_override
=
False
),
in_c_key
=
False
)
in_c_key
=
False
)
AddConfigVar
(
'numpy.seterr_divide'
,
AddConfigVar
(
'numpy.seterr_divide'
,
(
"Sets numpy's behavior for division by zero, see numpy.seterr. "
(
"Sets numpy's behavior for division by zero, see numpy.seterr. "
"'None' means using the default, defined by numpy.seterr_all."
),
"'None' means using the default, defined by numpy.seterr_all."
),
EnumStr
(
'None'
,
'ignore'
,
'warn'
,
'raise'
,
'call'
,
'print'
,
'log'
,
EnumStr
(
'None'
,
'ignore'
,
'warn'
,
'raise'
,
'call'
,
'print'
,
'log'
,
allow_override
=
False
),
allow_override
=
False
),
in_c_key
=
False
)
in_c_key
=
False
)
AddConfigVar
(
'numpy.seterr_over'
,
AddConfigVar
(
'numpy.seterr_over'
,
...
@@ -344,7 +358,7 @@ AddConfigVar('numpy.seterr_over',
...
@@ -344,7 +358,7 @@ AddConfigVar('numpy.seterr_over',
"see numpy.seterr. "
"see numpy.seterr. "
"'None' means using the default, defined by numpy.seterr_all."
),
"'None' means using the default, defined by numpy.seterr_all."
),
EnumStr
(
'None'
,
'ignore'
,
'warn'
,
'raise'
,
'call'
,
'print'
,
'log'
,
EnumStr
(
'None'
,
'ignore'
,
'warn'
,
'raise'
,
'call'
,
'print'
,
'log'
,
allow_override
=
False
),
allow_override
=
False
),
in_c_key
=
False
)
in_c_key
=
False
)
AddConfigVar
(
'numpy.seterr_under'
,
AddConfigVar
(
'numpy.seterr_under'
,
...
@@ -352,7 +366,7 @@ AddConfigVar('numpy.seterr_under',
...
@@ -352,7 +366,7 @@ AddConfigVar('numpy.seterr_under',
"see numpy.seterr. "
"see numpy.seterr. "
"'None' means using the default, defined by numpy.seterr_all."
),
"'None' means using the default, defined by numpy.seterr_all."
),
EnumStr
(
'None'
,
'ignore'
,
'warn'
,
'raise'
,
'call'
,
'print'
,
'log'
,
EnumStr
(
'None'
,
'ignore'
,
'warn'
,
'raise'
,
'call'
,
'print'
,
'log'
,
allow_override
=
False
),
allow_override
=
False
),
in_c_key
=
False
)
in_c_key
=
False
)
AddConfigVar
(
'numpy.seterr_invalid'
,
AddConfigVar
(
'numpy.seterr_invalid'
,
...
@@ -360,7 +374,7 @@ AddConfigVar('numpy.seterr_invalid',
...
@@ -360,7 +374,7 @@ AddConfigVar('numpy.seterr_invalid',
"see numpy.seterr. "
"see numpy.seterr. "
"'None' means using the default, defined by numpy.seterr_all."
),
"'None' means using the default, defined by numpy.seterr_all."
),
EnumStr
(
'None'
,
'ignore'
,
'warn'
,
'raise'
,
'call'
,
'print'
,
'log'
,
EnumStr
(
'None'
,
'ignore'
,
'warn'
,
'raise'
,
'call'
,
'print'
,
'log'
,
allow_override
=
False
),
allow_override
=
False
),
in_c_key
=
False
)
in_c_key
=
False
)
###
###
...
@@ -422,30 +436,33 @@ AddConfigVar('warn.sum_div_dimshuffle_bug',
...
@@ -422,30 +436,33 @@ AddConfigVar('warn.sum_div_dimshuffle_bug',
BoolParam
(
warn_default
(
'0.3'
)),
BoolParam
(
warn_default
(
'0.3'
)),
in_c_key
=
False
)
in_c_key
=
False
)
AddConfigVar
(
'warn.subtensor_merge_bug'
,
AddConfigVar
(
"Warn if previous versions of Theano (before 0.5rc2) could have given "
'warn.subtensor_merge_bug'
,
"incorrect results when indexing into a subtensor with negative "
"Warn if previous versions of Theano (before 0.5rc2) could have given "
"stride (for instance, for instance, x[a:b:-1][c])."
,
"incorrect results when indexing into a subtensor with negative "
BoolParam
(
warn_default
(
'0.5'
)),
"stride (for instance, for instance, x[a:b:-1][c])."
,
in_c_key
=
False
)
BoolParam
(
warn_default
(
'0.5'
)),
in_c_key
=
False
)
AddConfigVar
(
'warn.gpu_set_subtensor1'
,
"Warn if previous versions of Theano (before 0.6) could have given "
AddConfigVar
(
"incorrect results when moving to the gpu "
'warn.gpu_set_subtensor1'
,
"set_subtensor(x[int vector], new_value)"
,
"Warn if previous versions of Theano (before 0.6) could have given "
BoolParam
(
warn_default
(
'0.6'
)),
"incorrect results when moving to the gpu "
in_c_key
=
False
)
"set_subtensor(x[int vector], new_value)"
,
BoolParam
(
warn_default
(
'0.6'
)),
AddConfigVar
(
'warn.vm_gc_bug'
,
in_c_key
=
False
)
"There was a bug that existed in the default Theano configuration,"
" only in the development version between July 5th 2012"
AddConfigVar
(
" and July 30th 2012. This was not in a released version."
'warn.vm_gc_bug'
,
" If your code was affected by this bug, a warning"
"There was a bug that existed in the default Theano configuration,"
" will be printed during the code execution if you use the"
" only in the development version between July 5th 2012"
" `linker=vm,vm.lazy=True,warn.vm_gc_bug=True` Theano flags."
" and July 30th 2012. This was not in a released version."
" This warning is disabled by default as the bug was not released."
,
" If your code was affected by this bug, a warning"
BoolParam
(
False
),
" will be printed during the code execution if you use the"
in_c_key
=
False
)
" `linker=vm,vm.lazy=True,warn.vm_gc_bug=True` Theano flags."
" This warning is disabled by default as the bug was not released."
,
BoolParam
(
False
),
in_c_key
=
False
)
AddConfigVar
(
'warn.signal_conv2d_interface'
,
AddConfigVar
(
'warn.signal_conv2d_interface'
,
(
"Warn we use the new signal.conv2d() when its interface"
(
"Warn we use the new signal.conv2d() when its interface"
...
@@ -474,13 +491,14 @@ AddConfigVar('warn.inc_set_subtensor1',
...
@@ -474,13 +491,14 @@ AddConfigVar('warn.inc_set_subtensor1',
BoolParam
(
warn_default
(
'0.7'
)),
BoolParam
(
warn_default
(
'0.7'
)),
in_c_key
=
False
)
in_c_key
=
False
)
AddConfigVar
(
'compute_test_value'
,
AddConfigVar
(
(
"If 'True', Theano will run each op at graph build time, using "
'compute_test_value'
,
"Constants, SharedVariables and the tag 'test_value' as inputs "
(
"If 'True', Theano will run each op at graph build time, using "
"to the function. This helps the user track down problems in the "
"Constants, SharedVariables and the tag 'test_value' as inputs "
"graph before it gets optimized."
),
"to the function. This helps the user track down problems in the "
EnumStr
(
'off'
,
'ignore'
,
'warn'
,
'raise'
,
'pdb'
),
"graph before it gets optimized."
),
in_c_key
=
False
)
EnumStr
(
'off'
,
'ignore'
,
'warn'
,
'raise'
,
'pdb'
),
in_c_key
=
False
)
AddConfigVar
(
'compute_test_value_opt'
,
AddConfigVar
(
'compute_test_value_opt'
,
...
@@ -497,10 +515,11 @@ AddConfigVar('unpickle_function',
...
@@ -497,10 +515,11 @@ AddConfigVar('unpickle_function',
BoolParam
(
True
),
BoolParam
(
True
),
in_c_key
=
False
)
in_c_key
=
False
)
AddConfigVar
(
'reoptimize_unpickled_function'
,
AddConfigVar
(
"Re-optimize the graph when a theano function is unpickled from the disk."
,
'reoptimize_unpickled_function'
,
BoolParam
(
True
,
allow_override
=
True
),
"Re-optimize the graph when a theano function is unpickled from the disk."
,
in_c_key
=
False
)
BoolParam
(
True
,
allow_override
=
True
),
in_c_key
=
False
)
"""Note to developers:
"""Note to developers:
...
@@ -509,17 +528,18 @@ AddConfigVar('reoptimize_unpickled_function',
...
@@ -509,17 +528,18 @@ AddConfigVar('reoptimize_unpickled_function',
== 'high', you should include a call to printing.min_informative_str
== 'high', you should include a call to printing.min_informative_str
on all important apply nodes.
on all important apply nodes.
"""
"""
AddConfigVar
(
'exception_verbosity'
,
AddConfigVar
(
"If 'low', the text of exceptions will generally refer "
\
'exception_verbosity'
,
+
"to apply nodes with short names such as "
\
"If 'low', the text of exceptions will generally refer "
+
"Elemwise{add_no_inplace}. If 'high', some exceptions "
\
+
"to apply nodes with short names such as "
+
"will also refer to apply nodes with long descriptions "
\
+
"Elemwise{add_no_inplace}. If 'high', some exceptions "
+
""" like:
+
"will also refer to apply nodes with long descriptions "
A. Elemwise{add_no_inplace}
+
""" like:
B. log_likelihood_v_given_h
A. Elemwise{add_no_inplace}
C. log_likelihood_h"""
,
B. log_likelihood_v_given_h
EnumStr
(
'low'
,
'high'
),
C. log_likelihood_h"""
,
in_c_key
=
False
)
EnumStr
(
'low'
,
'high'
),
in_c_key
=
False
)
# Test if the env variable is set
# Test if the env variable is set
var
=
os
.
getenv
(
'OMP_NUM_THREADS'
,
None
)
var
=
os
.
getenv
(
'OMP_NUM_THREADS'
,
None
)
...
@@ -560,7 +580,7 @@ AddConfigVar('openmp',
...
@@ -560,7 +580,7 @@ AddConfigVar('openmp',
" If it is set to 1, we disable openmp in Theano by default."
,
" If it is set to 1, we disable openmp in Theano by default."
,
BoolParam
(
default_openmp
),
BoolParam
(
default_openmp
),
in_c_key
=
False
,
in_c_key
=
False
,
)
)
AddConfigVar
(
'openmp_elemwise_minsize'
,
AddConfigVar
(
'openmp_elemwise_minsize'
,
"If OpenMP is enabled, this is the minimum size of vectors "
"If OpenMP is enabled, this is the minimum size of vectors "
...
@@ -568,19 +588,21 @@ AddConfigVar('openmp_elemwise_minsize',
...
@@ -568,19 +588,21 @@ AddConfigVar('openmp_elemwise_minsize',
"in element wise ops."
,
"in element wise ops."
,
IntParam
(
200000
),
IntParam
(
200000
),
in_c_key
=
False
,
in_c_key
=
False
,
)
)
AddConfigVar
(
'check_input'
,
AddConfigVar
(
"Specify if types should check their input in their C code. "
'check_input'
,
"It can be used to speed up compilation, reduce overhead "
"Specify if types should check their input in their C code. "
"(particularly for scalars) and reduce the number of generated C "
"It can be used to speed up compilation, reduce overhead "
"files."
,
"(particularly for scalars) and reduce the number of generated C "
BoolParam
(
True
))
"files."
,
BoolParam
(
True
))
AddConfigVar
(
'cache_optimizations'
,
"WARNING: work in progress, does not work yet. "
AddConfigVar
(
"Specify if the optimization cache should be used. This cache will "
'cache_optimizations'
,
"any optimized graph and its optimization. Actually slow downs a lot "
"WARNING: work in progress, does not work yet. "
"the first optimization, and could possibly still contains some bugs. "
"Specify if the optimization cache should be used. This cache will "
"Use at your own risks."
,
"any optimized graph and its optimization. Actually slow downs a lot "
BoolParam
(
False
))
"the first optimization, and could possibly still contains some bugs. "
"Use at your own risks."
,
BoolParam
(
False
))
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论