提交 9648f76b authored 作者: Frederic Bastien's avatar Frederic Bastien

back port to python 2.4 the new config stuff.

上级 9739a54b
...@@ -11,7 +11,7 @@ from theano.gof import Env, graph, utils, link ...@@ -11,7 +11,7 @@ from theano.gof import Env, graph, utils, link
from theano.gof.link import WrapLinkerMany, raise_with_op from theano.gof.link import WrapLinkerMany, raise_with_op
#from theano.gof.cutils import run_cthunk #from theano.gof.cutils import run_cthunk
from theano.gof.cc import OpWiseCLinker, CLinker from theano.gof.cc import OpWiseCLinker, CLinker
from ..configparser import config from theano.configparser import config, AddConfigVar, IntParam, BoolParam
from theano.compile.function_module import (FunctionMaker, from theano.compile.function_module import (FunctionMaker,
Function, Function,
infer_reuse_pattern, infer_reuse_pattern,
...@@ -20,7 +20,6 @@ from theano.compile.function_module import (FunctionMaker, ...@@ -20,7 +20,6 @@ from theano.compile.function_module import (FunctionMaker,
SymbolicOutput, SymbolicOutput,
Supervisor) Supervisor)
from theano.compile.mode import Mode, register_mode from theano.compile.mode import Mode, register_mode
from ..configparser import config, AddConfigVar, IntParam, BoolParam
AddConfigVar('DebugMode.patience', AddConfigVar('DebugMode.patience',
"Optimize graph this many times to detect inconsistency", "Optimize graph this many times to detect inconsistency",
......
...@@ -4,7 +4,7 @@ import os, logging ...@@ -4,7 +4,7 @@ import os, logging
import numpy import numpy
from theano import gof from theano import gof
from ..configparser import config from theano.configparser import config
_logger = logging.getLogger('theano.compile.mode') _logger = logging.getLogger('theano.compile.mode')
......
...@@ -6,7 +6,7 @@ from theano.compile.mode import Mode, register_mode, predefined_modes, predefine ...@@ -6,7 +6,7 @@ from theano.compile.mode import Mode, register_mode, predefined_modes, predefine
from theano.gof.cc import OpWiseCLinker from theano.gof.cc import OpWiseCLinker
from theano.gof.python25 import any from theano.gof.python25 import any
from theano import gof from theano import gof
from ..configparser import config, AddConfigVar, IntParam from theano.configparser import config, AddConfigVar, IntParam
import_time = time.time() import_time = time.time()
......
import os import os
from .configparser import TheanoConfigParser, AddConfigVar, EnumStr, StrParam, IntParam, FloatParam, BoolParam from theano.configparser import TheanoConfigParser, AddConfigVar, EnumStr, StrParam, IntParam, FloatParam, BoolParam
config = TheanoConfigParser() config = TheanoConfigParser()
......
...@@ -4,7 +4,7 @@ import os, sys ...@@ -4,7 +4,7 @@ import os, sys
import platform import platform
import re import re
from ..configparser import config, AddConfigVar, StrParam from theano.configparser import config, AddConfigVar, StrParam
def default_compiledirname(): def default_compiledirname():
platform_id = platform.platform() + '-' + platform.processor() platform_id = platform.platform() + '-' + platform.processor()
......
...@@ -7,7 +7,7 @@ import numpy ...@@ -7,7 +7,7 @@ import numpy
from theano import gof from theano import gof
from theano.gof import Op, utils, Variable, Constant, Type, Apply, Env from theano.gof import Op, utils, Variable, Constant, Type, Apply, Env
from theano.gof.python25 import partial, all, any from theano.gof.python25 import partial, all, any
from ..configparser import config from theano.configparser import config
def upcast(dtype, *dtypes): def upcast(dtype, *dtypes):
z = numpy.zeros((), dtype = dtype) z = numpy.zeros((), dtype = dtype)
......
...@@ -4,7 +4,7 @@ __docformat__ = "restructuredtext en" ...@@ -4,7 +4,7 @@ __docformat__ = "restructuredtext en"
import __builtin__ import __builtin__
import sys # for sys.maxint import sys # for sys.maxint
from ..configparser import config from theano.configparser import config
import traceback #for overriding Op.__call__ import traceback #for overriding Op.__call__
if sys.version_info >= (2,5): if sys.version_info >= (2,5):
import functools import functools
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
import sys, traceback, logging import sys, traceback, logging
import numpy import numpy
import numpy.distutils import numpy.distutils
from ..configparser import config, AddConfigVar, StrParam from theano.configparser import config, AddConfigVar, StrParam
from theano.gof import (utils, Op, Apply, view_roots, PatternSub, DestroyHandler, from theano.gof import (utils, Op, Apply, view_roots, PatternSub, DestroyHandler,
SeqOptimizer, local_optimizer, Optimizer, LocalOptimizer, OpKeyOptimizer, SeqOptimizer, local_optimizer, Optimizer, LocalOptimizer, OpKeyOptimizer,
InconsistencyError, toolbox) InconsistencyError, toolbox)
......
...@@ -9,7 +9,7 @@ _logger = logging.getLogger('theano.tensor.opt') ...@@ -9,7 +9,7 @@ _logger = logging.getLogger('theano.tensor.opt')
from theano import gof from theano import gof
from theano.gof import opt, InconsistencyError, TopoOptimizer, graph from theano.gof import opt, InconsistencyError, TopoOptimizer, graph
from theano.gof.utils import MethodNotDefined from theano.gof.utils import MethodNotDefined
from ..configparser import config from theano.configparser import config
from elemwise import Elemwise, DimShuffle from elemwise import Elemwise, DimShuffle
from theano import scalar from theano import scalar
import basic as T import basic as T
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论