提交 b4b493fd authored 作者: abalkin's avatar abalkin

Removed unused import and converted relative imports to absolute.

上级 f3acb0db
import cPickle, logging, sys import cPickle, logging
_logger=logging.getLogger("theano.gof.callcache") _logger=logging.getLogger("theano.gof.callcache")
......
...@@ -44,13 +44,13 @@ AddConfigVar('gcc.cxxflags', ...@@ -44,13 +44,13 @@ AddConfigVar('gcc.cxxflags',
StrParam("")) StrParam(""))
# gof imports # gof imports
import graph from theano.gof import graph
import link from theano.gof import link
import utils from theano.gof import utils
from compilelock import get_lock, release_lock from theano.gof.compilelock import get_lock, release_lock
import cmodule from theano.gof import cmodule
import logging import logging
......
...@@ -25,8 +25,8 @@ from theano.gof.cc import hash_from_code ...@@ -25,8 +25,8 @@ from theano.gof.cc import hash_from_code
from theano.misc.windows import call_subprocess_Popen from theano.misc.windows import call_subprocess_Popen
# we will abuse the lockfile mechanism when reading and writing the registry # we will abuse the lockfile mechanism when reading and writing the registry
import compilelock from theano.gof import compilelock
from compiledir import gcc_version_str from theano.gof.compiledir import gcc_version_str
from theano.configparser import AddConfigVar, BoolParam from theano.configparser import AddConfigVar, BoolParam
......
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
# same compilation directory (which can cause crashes). # same compilation directory (which can cause crashes).
from theano import config from theano import config
import compiledir
import os, random, time, atexit import os, random, time, atexit
import socket # only used for gethostname() import socket # only used for gethostname()
import logging import logging
......
import os import os
import sys import sys
from compilelock import get_lock, release_lock from theano.gof.compilelock import get_lock, release_lock
from theano import config from theano import config
# TODO These two lines may be removed in the future, when we are 100% sure # TODO These two lines may be removed in the future, when we are 100% sure
......
...@@ -5,15 +5,15 @@ Contains the FunctionGraph class and exception ...@@ -5,15 +5,15 @@ Contains the FunctionGraph class and exception
types that it can raise types that it can raise
""" """
import sys import sys
import graph from theano.gof import graph
import utils from theano.gof import utils
import toolbox from theano.gof import toolbox
from python25 import all from theano.gof.python25 import all
from theano import config from theano import config
import warnings import warnings
NullType = None NullType = None
import theano
from python25 import OrderedDict from theano.gof.python25 import OrderedDict
from theano.misc.ordered_set import OrderedSet from theano.misc.ordered_set import OrderedSet
class InconsistencyError(Exception): class InconsistencyError(Exception):
......
"""WRITEME""" """WRITEME"""
import utils from theano.gof import utils
import graph from theano.gof import graph
from type import Type from theano.gof.type import Type
import sys, traceback import sys, traceback
from copy import copy from copy import copy
from theano.gof.python25 import all
__excepthook = sys.excepthook __excepthook = sys.excepthook
......
...@@ -11,7 +11,6 @@ __contact__ = "theano-dev <theano-dev@googlegroups.com>" ...@@ -11,7 +11,6 @@ __contact__ = "theano-dev <theano-dev@googlegroups.com>"
__docformat__ = "restructuredtext en" __docformat__ = "restructuredtext en"
import copy
import logging import logging
import os import os
import subprocess import subprocess
...@@ -22,10 +21,10 @@ import theano ...@@ -22,10 +21,10 @@ import theano
from theano import config from theano import config
from theano.misc.windows import call_subprocess_Popen from theano.misc.windows import call_subprocess_Popen
import cc import theano.gof.cc
import graph from theano.gof import graph
import utils from theano.gof import utils
from fg import FunctionGraph from theano.gof.fg import FunctionGraph
class CLinkerObject(object): class CLinkerObject(object):
...@@ -572,7 +571,7 @@ class Op(utils.object2, PureOp, CLinkerOp): ...@@ -572,7 +571,7 @@ class Op(utils.object2, PureOp, CLinkerOp):
e_no_recycling = [new_o e_no_recycling = [new_o
for (new_o, old_o) in zip(e.outputs, node.outputs) for (new_o, old_o) in zip(e.outputs, node.outputs)
if old_o in no_recycling] if old_o in no_recycling]
cl = cc.CLinker().accept(e, cl = theano.gof.cc.CLinker().accept(e,
no_recycling=e_no_recycling) no_recycling=e_no_recycling)
logger.debug('Trying CLinker.make_thunk') logger.debug('Trying CLinker.make_thunk')
......
...@@ -10,16 +10,15 @@ import time ...@@ -10,16 +10,15 @@ import time
import numpy import numpy
import graph from theano.gof import graph
from fg import InconsistencyError from theano.gof.fg import InconsistencyError
import op from theano.gof import op
import utils from theano.gof import utils
import unify from theano.gof import unify
import toolbox from theano.gof import toolbox
import theano import theano
from theano import config from theano import config
from theano.gof.python25 import any, all, deque from theano.gof.python25 import any, all, deque
from theano.configparser import AddConfigVar, BoolParam
#if sys.version_info[:2] >= (2,5): #if sys.version_info[:2] >= (2,5):
# from collections import defaultdict # from collections import defaultdict
......
import StringIO import StringIO
import sys import sys
from python25 import DefaultOrderedDict from theano.gof.python25 import DefaultOrderedDict
import numpy import numpy
import opt from theano.gof import opt
from theano.configparser import AddConfigVar, FloatParam from theano.configparser import AddConfigVar, FloatParam
from theano import config from theano import config
AddConfigVar('optdb.position_cutoff', AddConfigVar('optdb.position_cutoff',
......
from graph import list_of_nodes from theano.gof.graph import list_of_nodes
from theano.gof.python25 import any, defaultdict from theano.gof.python25 import any, defaultdict
......
...@@ -4,7 +4,7 @@ import time ...@@ -4,7 +4,7 @@ import time
from theano.gof.python25 import partial from theano.gof.python25 import partial
from theano.gof.python25 import OrderedDict from theano.gof.python25 import OrderedDict
import graph from theano.gof import graph
......
...@@ -2,11 +2,9 @@ ...@@ -2,11 +2,9 @@
__docformat__ = "restructuredtext en" __docformat__ = "restructuredtext en"
import copy from theano.gof import utils
import utils from theano.gof.utils import MethodNotDefined, object2
from utils import MethodNotDefined, object2 from theano.gof import graph
import graph
from theano import config
######## ########
# Type # # Type #
......
...@@ -9,8 +9,8 @@ if there exists an assignment to all unification variables such that ...@@ -9,8 +9,8 @@ if there exists an assignment to all unification variables such that
""" """
from copy import copy from copy import copy
from python25 import partial from theano.gof.python25 import partial
from utils import * from theano.gof.utils import *
################################ ################################
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
# import variable # import variable
from theano import config from theano import config
import re, os, traceback import re, traceback
def add_tag_trace(thing): def add_tag_trace(thing):
"""Add tag.trace to an node or variable. """Add tag.trace to an node or variable.
......
...@@ -11,9 +11,6 @@ import warnings ...@@ -11,9 +11,6 @@ import warnings
from theano.gof.python25 import all from theano.gof.python25 import all
import theano
config = theano.config
from theano.configparser import config, AddConfigVar, BoolParam, ConfigParam from theano.configparser import config, AddConfigVar, BoolParam, ConfigParam
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论