提交 e14e9c33 authored 作者: David Warde-Farley's avatar David Warde-Farley 提交者: Arnaud Bergeron

reduce() and xrange() from six.

上级 af1314a0
......@@ -8,6 +8,7 @@ import time
import theano
import theano.tensor as T
import theano.sandbox
from theano.compat.six.moves import xrange
from theano.compile import module, Mode, ProfileMode
from theano import gof, Op, Apply
......
......@@ -4,6 +4,7 @@ from __future__ import absolute_import
import numpy as N
import sys
import time
from theano.compat.six.moves import xrange
# c: aa.cc
......
......@@ -3,6 +3,7 @@ import theano
import numpy as N
from theano import tensor as T
from theano.tensor import nnet as NN
from theano.compat.six.moves import xrange
from theano.compile import module as M
class RegressionLayer(M.Module):
......
......@@ -5,6 +5,7 @@ import numpy
import theano
from theano import tensor as tt
from theano.compat.six.moves import xrange
from theano.ifelse import ifelse
a, b = tt.scalars('a', 'b')
......
from __future__ import print_function
import theano
import theano.tensor as tt
from theano.compat.six.moves import xrange
k = tt.iscalar("k")
A = tt.vector("A")
......
from __future__ import print_function
import theano
import theano.tensor as T
from theano.compat.six.moves import xrange
k = T.iscalar("k"); A = T.vector("A")
......
......@@ -6,6 +6,7 @@ import numpy
import theano
import theano.tensor as tt
from theano.compat.six.moves import xrange
# 1. First example
......
......@@ -17,8 +17,8 @@ import numpy
import theano
from theano import gof
from theano.compat import get_unbound_function, product as itertools_product
from theano.compat.six import StringIO
from theano.gof import (graph, utils, link,
from theano.compat.six.moves import StringIO, xrange
from theano.gof import (FunctionGraph, graph, utils, link,
ops_with_inner_function)
from theano.gof.link import raise_with_op
from theano.configparser import (config, AddConfigVar, BoolParam, IntParam,
......
......@@ -13,6 +13,7 @@ import numpy
import theano
from theano import gof
from theano.compat import partial
from theano.compat.six.moves import xrange
import theano.compile.mode
from theano.compile.io import (
In, SymbolicInput, SymbolicInputKit, SymbolicOutput)
......
......@@ -9,6 +9,7 @@ import warnings
import theano
from theano import gof
from theano.compat.six.moves import xrange
import numpy
......
......@@ -12,7 +12,7 @@ from itertools import izip
import numpy
from theano.compat import PY3
from theano.compat.six import StringIO
from theano.compat.six.moves import StringIO, xrange
from theano.gof.utils import MethodNotDefined
import theano
......
......@@ -16,6 +16,7 @@ import numpy
import theano
from theano import config
from theano.compat.six.moves import reduce
from theano.gof import graph, op, utils, unify, toolbox
from theano.gof.fg import InconsistencyError
from theano.compat import deque
......
from __future__ import print_function
from theano.compat.six.moves import reduce
if 0:
class _EquilibriumOptimizer(NavigatorOptimizer):
......
......@@ -2,6 +2,7 @@ from __future__ import print_function
import unittest
from theano.compat.six.moves import xrange
from theano.gof.type import Type
from theano.gof import graph
from theano.gof.graph import Variable, Apply
......
......@@ -5,6 +5,7 @@ import numpy
import theano
import theano.gof.op as op
from theano.compat.six.moves import xrange
from theano.gof.type import Type, Generic
from theano.gof.graph import Apply, Variable
import theano.tensor as T
......
......@@ -5,6 +5,7 @@ import theano
from theano import tensor
from theano.gof.graph import io_toposort
from theano.compat import cmp
from theano.compat.six.moves import xrange
def test_dependence():
......
import theano
from theano.gof.utils import give_variables_names, unique, remove
from theano.compat.six.moves import xrange
def test_give_variables_names():
......
......@@ -10,6 +10,7 @@ import numpy
from theano import function
from theano.gof import vm
from theano.gof import OpWiseCLinker
from theano.compat.six.moves import xrange
from theano.compile import Mode
from theano import tensor
......
......@@ -16,6 +16,7 @@ from theano.configparser import (config, AddConfigVar,
import theano.gof.cmodule
from theano.compat import defaultdict
from theano.compat.six.moves import xrange
logger = logging.getLogger(__name__)
......
......@@ -13,6 +13,7 @@ import theano
from theano import gof
from theano.gof import Variable
from theano.compat import OrderedDict
from theano.compat.six.moves import xrange
from theano.gof.null_type import NullType, null_type
from theano.gof.op import get_debug_values
from theano.compile import ViewOp
......
......@@ -22,6 +22,7 @@ from theano.tensor import TensorType
from theano import gof
from theano.gof import PureOp, Apply
from theano.compat.six.moves import xrange
from theano.compile import optdb
from theano.tensor import opt
from theano.scan_module.scan_utils import find_up
......
......@@ -7,6 +7,7 @@ import numpy as np
import theano
import theano.tensor as T
from theano.compat.six.moves import xrange
parser = OptionParser(usage='%prog <options>\n Compute time for'
' fast and slow elemwise operations')
......
......@@ -2,6 +2,7 @@
This code can only work if gnumpy and theano are initialized on the
same gpu as theano.
"""
from theano.compat.six.moves import reduce
try:
import gnumpy
......
......@@ -45,6 +45,7 @@ __version__ = "1"
import tokenize
import os, shutil
import sys
from theano.compat.six.moves import xrange
verbose = 0
recurse = 0
......
......@@ -23,6 +23,7 @@ TheanoElementwiseKernel.
import numpy
import theano
from theano.compat.six.moves import xrange
from theano.gof import Op, Apply, local_optimizer, EquilibriumDB
from theano.sandbox.cuda import GpuElemwise, CudaNdarrayType, GpuOp
from theano.sandbox.cuda.basic_ops import (as_cuda_ndarray_variable,
......
import warnings
from theano.compat.six.moves import xrange
def render_string(string, sub):
......
......@@ -25,7 +25,7 @@ except ImportError:
import theano
from theano import gof
from theano import config
from theano.compat.six import StringIO
from theano.compat.six.moves import StringIO, reduce
from theano.gof import Op, Apply
from theano.compile import Function, debugmode
from theano.compile.profilemode import ProfileMode
......
......@@ -3,6 +3,7 @@ import numpy
import theano
import theano.tensor as T
from theano.compat.six.moves import xrange
from theano.gof import local_optimizer
from theano.sandbox.cuda.basic_ops import as_cuda_ndarray_variable
from theano.misc import strutil
......
......@@ -5,6 +5,7 @@ import theano.tensor as T
from theano.misc import strutil
import theano
from theano.compat.six.moves import xrange
from theano.tensor.nnet.ConvTransp3D import ConvTransp3D
from theano.gof import local_optimizer
......
......@@ -9,7 +9,7 @@ import theano
from theano import gof, Type, Apply
from theano import tensor, scalar, config
from theano.compat.six import StringIO
from theano.compat.six.moves import StringIO, xrange
from theano.gradient import grad_undefined
from theano.scalar import Scalar
......
......@@ -7,7 +7,7 @@ _logger = logging.getLogger(__name__)
import theano
from theano import Apply
from theano import tensor
from theano.compat.six import StringIO
from theano.compat.six.moves import StringIO, reduce
from theano.sandbox.cuda.type import CudaNdarrayType
from theano.sandbox.cuda import GpuOp
from theano.sandbox.cuda.basic_ops import (as_cuda_ndarray_variable,
......
......@@ -15,6 +15,7 @@ from theano import scalar as scal
from theano import config, tensor, gof
import theano.ifelse
from theano.compat.six.moves import reduce
from theano.compile import optdb
from theano.gof import (local_optimizer, EquilibriumDB, ProxyDB,
Optimizer, toolbox)
......
......@@ -9,6 +9,7 @@ from nose.plugins.skip import SkipTest
from nose.tools import assert_raises
import theano
from theano.compat.six.moves import reduce
from theano.compile.pfunc import pfunc
from theano import config, tensor
import theano.tensor.tests.test_nlinalg
......
......@@ -3,6 +3,7 @@ import os
import theano
from theano import config, gof
from theano.compat.six.moves import reduce
from .comp import NVCC_compiler
from .type import GpuArrayType
from .basic_ops import as_gpuarray_variable
......
......@@ -140,6 +140,7 @@ except ImportError:
pass
from theano.configparser import config, AddConfigVar, StrParam
from theano.compat.six.moves import reduce
from theano.gof import (utils, Op, view_roots,
local_optimizer, Optimizer,
InconsistencyError, toolbox, SequenceDB,
......
......@@ -21,6 +21,7 @@ import numpy as N # guys... please don't do this in the library :(
import theano
from theano import gof
from theano.compat.six.moves import reduce
from theano.gof import opt, InconsistencyError, TopoOptimizer, graph
from theano.gof import Variable, Constant
from theano.compat import maxsize
......
......@@ -8,6 +8,7 @@ import numpy
# local imports
import theano
from theano.compat.six.moves import reduce
from theano import tensor
from theano.tensor import opt
from theano import gof
......
......@@ -20,7 +20,7 @@ from numpy.testing.noseclasses import KnownFailureTest
from distutils.version import LooseVersion
import theano
from theano.compat import PY3, exc_message, operator_div
from theano.compat import PY3, exc_message, operator_div, reduce
from theano.compat.six import StringIO
from theano import compile, config, function, gof, tensor, shared
from theano.compile import DeepCopyOp
......
from theano.tests.record import *
from theano import function
from theano.compat.six.moves import xrange
from theano.tensor import iscalar
import cStringIO
......
......@@ -15,6 +15,7 @@ import theano
import theano.tensor as T
from theano import function, compat
from theano.compat.six.moves import xrange
from theano import config
from theano.tests import unittest_tools as utt
from theano.sandbox.rng_mrg import MRG_RandomStreams
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论