提交 b60891b6 authored 作者: Pascal Lamblin's avatar Pascal Lamblin

Get rid of references to the older THEANO_* environment variables in the code…

Get rid of references to the older THEANO_* environment variables in the code comments and inline doc.
上级 78131b18
......@@ -221,12 +221,8 @@ predefined_modes = {'FAST_COMPILE': FAST_COMPILE,
'SANITY_CHECK': SANITY_CHECK}
##
# The default mode used by functions and modules is read from the environment
# variable THEANO_DEFAULT_MODE. Unit tests will run using this value. If the env. var.
# is not set, it will default to 'FAST_RUN'
# The default mode used by functions and modules is read from the configuration.
# keep default_mode.optimizer==default_optimizer and default_mode.linker==default_linker!
##
default_mode = config.mode
def get_mode(string):
......
......@@ -312,10 +312,10 @@ class ProfileMode(Mode):
register_mode('PROFILE_MODE',ProfileMode())
def atexit_print_default_profile_mode():
"""Print the summary of the predefied mode PROFILE_MODE if used.
"""Print the summary of the predefined mode PROFILE_MODE if used.
This all to have the summary printed at exit when we do
THEANO_DEFAULT_MODE=PROFILE_MODE
This all to have the summary printed at exit when
config.mode=PROFILE_MODE
"""
prof_mode=predefined_modes["PROFILE_MODE"]
if prof_mode.local_time[0]>0:
......
......@@ -261,11 +261,14 @@ def _wrap_tensor_into_member(x):
compile.module.register_wrapper(_obj_is_wrappable_as_tensor, _wrap_tensor_into_member)
if int(config.tensor.cmp_sloppy)>1:
# This environment variable is a quick-and-dirty way to get low-precision comparisons.
# For a more precise setting of these tolerances set them explicitly in your user code by
# assigning, for example, "theano.tensor.basic.float32_atol = ..."
#when THEANO_CMP_SLOPPY>1 we are even more sloppy. This is usefull to test the gpu as they don't use extended precision and this cause some difference bigger then the normal sloppy.
# This config variable is a quick-and-dirty way to get low-precision
# comparisons. For a more precise setting of these tolerances set
# them explicitly in your user code by assigning, for example,
# "theano.tensor.basic.float32_atol = ..."
# When config.tensor.cmp_sloppy>1 we are even more sloppy. This is
# useful to test the GPU as they don't use extended precision and
# this cause some difference bigger then the normal sloppy.
float32_atol = 5e-4
float32_rtol = 1e-3
float64_rtol = 1e-4
......
......@@ -44,7 +44,7 @@ def ldflags(libs=True, flags=False):
"""Return a list of libraries against which an Op's object file should be
linked to benefit from a BLAS implementation.
Default: ['blas'], but environment variable THEANO_BLAS_LDFLAGS overrides this.
Default: ['blas'], but configuration variable config.blas.ldflags overrides this.
"""
rval = []
for t in config.blas.ldflags.split():
......@@ -52,9 +52,9 @@ def ldflags(libs=True, flags=False):
t0, t1, t2 = t[0:3]
assert t0 == '-'
except:
raise ValueError('invalid token in THEANO_BLAS_LDFLAGS', t)
raise ValueError('invalid token in config.blas.ldflags', t)
if t1 == 'L':
raise ValueError('library dir not allowed in THEANO_BLAS_LDFLAGS', t)
raise ValueError('library dir not allowed in config.blas.ldflags', t)
elif libs and t1=='l': # example -lmkl
rval.append(t[2:])
elif flags and t1!='l': # example -openmp
......
......@@ -34,7 +34,7 @@ def fetch_seed(pseed=None):
#backport
#seed = int(seed) if seed else None
except ValueError:
print >> sys.stderr, 'Error: THEANO_UNITTEST_SEED contains '\
print >> sys.stderr, 'Error: config.unittests.rseed contains '\
'invalid seed, using None instead'
seed = None
......@@ -48,7 +48,7 @@ def seed_rng(pseed=None):
seed = fetch_seed(pseed)
if pseed and pseed!=seed:
print >> sys.stderr, 'Warning: using seed given by THEANO_UNITTEST_SEED=%i'\
print >> sys.stderr, 'Warning: using seed given by config.unittests.rseed=%i'\
'instead of seed %i given as parameter' % (seed, pseed)
numpy.random.seed(seed)
return seed
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论