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