提交 60c97cb7 authored 作者: abalkin's avatar abalkin

Converted relative imports to absolute.

上级 f6b3d501
...@@ -15,8 +15,8 @@ import warnings ...@@ -15,8 +15,8 @@ import warnings
from itertools import chain from itertools import chain
import function_module as F import theano.compile.function_module
import mode as get_mode import theano.compile.mode
#This module is imported by other parts of theano, and worse still, other #This module is imported by other parts of theano, and worse still, other
...@@ -106,7 +106,7 @@ class Component(object): ...@@ -106,7 +106,7 @@ class Component(object):
be called. be called.
""" """
if mode is None: if mode is None:
mode = get_mode.get_default_mode() mode = theano.compile.mode.get_default_mode()
memo = {} memo = {}
self.allocate(memo) self.allocate(memo)
rval = self.build(mode, memo) rval = self.build(mode, memo)
...@@ -120,7 +120,7 @@ class Component(object): ...@@ -120,7 +120,7 @@ class Component(object):
arguments and the keyword arguments. If 'mode' is in the arguments and the keyword arguments. If 'mode' is in the
keyword arguments it will be passed to build(). keyword arguments it will be passed to build().
""" """
mode = kwargs.pop('mode', get_mode.get_default_mode()) mode = kwargs.pop('mode', theano.compile.mode.get_default_mode())
rval = self.make_no_init(mode) rval = self.make_no_init(mode)
if hasattr(rval, 'initialize'): if hasattr(rval, 'initialize'):
rval.initialize(*args, **kwargs) rval.initialize(*args, **kwargs)
...@@ -503,7 +503,7 @@ class Method(Component): ...@@ -503,7 +503,7 @@ class Method(Component):
effective_mode = self.mode effective_mode = self.mode
# We ignore unused inputs, since all the inputs are passed # We ignore unused inputs, since all the inputs are passed
rval = F.orig_function(inputs, outputs, effective_mode, rval = theano.compile.function_module.orig_function(inputs, outputs, effective_mode,
on_unused_input='ignore') on_unused_input='ignore')
memo[self] = rval memo[self] = rval
return rval return rval
...@@ -1192,7 +1192,7 @@ class Module(ComponentDict): ...@@ -1192,7 +1192,7 @@ class Module(ComponentDict):
""" """
self.make_module_instance(args,kwargs) self.make_module_instance(args,kwargs)
mode = kwargs.pop('mode', get_mode.get_default_mode()) mode = kwargs.pop('mode', theano.compile.mode.get_default_mode())
rval = self.make_no_init(mode) rval = self.make_no_init(mode)
if hasattr(rval, 'initialize'): if hasattr(rval, 'initialize'):
rval.initialize(*args, **kwargs) rval.initialize(*args, **kwargs)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论