提交 2e63b45a authored 作者: Frederic's avatar Frederic

remove import/variable not used (and add a missing warnings imports).

上级 f27555e7
......@@ -756,7 +756,6 @@ def _check_viewmap(node, storage_map):
good_alias, bad_alias = {}, {}
outstorage = storage_map[onode][0]
instorage_id = [id(storage_map[i][0]) for i in node.inputs]
# first find out which input it aliases
view_map = getattr(node.op, 'view_map', {})
......@@ -868,8 +867,6 @@ def _find_bad_optimizations0(order, reasons, r_vals):
for i, node in enumerate(order):
for new_r in node.outputs:
for reason, r, old_graph_str, new_graph_str in reasons[new_r]:
problem = False
#check if the value for new_r doesn't match the value for r
new_r_val = r_vals[new_r]
r_val = r_vals[r]
......@@ -1552,7 +1549,6 @@ class _Linker(gof.link.LocalLinker):
# don't do this ugly hacky way of setting the
# filter_checks_isfinite
from theano.tensor import TensorType # to set filter_check_isfinite
from theano import tests # for config.unittests.rseed
fgraph = self.fgraph
input_storage_ = input_storage
output_storage_ = output_storage
......@@ -1706,8 +1702,6 @@ class _Linker(gof.link.LocalLinker):
if r.owner is None]
try:
equiv_vals = {}
problematic = set()
# r_vals are the true values associated with each
# variable in the graph they should not change during
# the evaluation of this function, even when the graph
......@@ -2265,7 +2259,6 @@ class _Maker(FunctionMaker): # inheritance buys a few helper functions
"default for a SymbolicInputKit.")
input_storage.append(default.storage)
default = None
required = False
elif isinstance(input, SymbolicInputKit):
# If the input is a SymbolicInputKit, it represents more than
# one storage unit. The indices and subinputs lists represent
......
......@@ -9,6 +9,7 @@ import theano
from theano import gof, Type, Apply
from theano import tensor, scalar, config
from theano.compat.six import StringIO
from theano.gradient import grad_undefined
from theano.scalar import Scalar
scal = scalar # somewhere scalar gets reassigned to be a function
......
......@@ -7,15 +7,15 @@ that ndim is 0 as with all scalar type.
"""
import copy, logging, sys
import logging
import numpy
from theano.scalar.basic import upgrade_to_float_no_complex, complex_types
from theano.scalar.basic_scipy import Erfinv
from theano.compat.six import StringIO
from theano import Apply, Constant, Op, Type, Variable
from theano import gof, scalar, tensor
from theano import Apply
from theano import gof, scalar
_logger_name = 'theano.sandbox.cuda.elemwise'
......@@ -430,7 +430,6 @@ class NaiveAlgo(object):
return sio.getvalue()
def c_src_kernel_Ccontiguous(self, node, nodename):
nd = node.outputs[0].type.ndim
sio = StringIO()
#print 'C_SRC_KERNEL', sio.getvalue()
......
import commands
import distutils
import logging
import os
import re
import subprocess
import sys
import warnings
......@@ -245,7 +243,6 @@ class NVCC_compiler(object):
preargs = list(preargs)
if sys.platform != 'win32':
preargs.append('-fPIC')
no_opt = False
cuda_root = config.cuda.root
#The include dirs gived by the user should have precedence over
......
......@@ -2,6 +2,7 @@ import errno
import logging
import os
import sys
import warnings
import numpy
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论