提交 e1b2da30 authored 作者: Olivier Breuleux's avatar Olivier Breuleux

moved a lot of functionality in the theano.tensor submodule

上级 499b7575
...@@ -44,12 +44,9 @@ from compile import \ ...@@ -44,12 +44,9 @@ from compile import \
FunctionMaker, function, OpFromGraph #, eval_outputs, fast_compute FunctionMaker, function, OpFromGraph #, eval_outputs, fast_compute
import tensor import tensor
import tensor_random
import scalar import scalar
import sparse import sparse
import gradient import gradient
import elemwise
import tensor_opt
## import scalar_opt ## import scalar_opt
......
...@@ -8,20 +8,19 @@ import inspect ...@@ -8,20 +8,19 @@ import inspect
import functools import functools
import numpy import numpy
from copy import copy from copy import copy
from gof import Result, Op, utils, AbstractFunctionError, Type, Constant, Apply, Value from .. import gof
import gof from ..gof import Result, Op, utils, AbstractFunctionError, Type, Constant, Apply, Value
import blas # for gemm, dot import blas # for gemm, dot
import gradient from .. import gradient
import elemwise import elemwise
import scalar as scal from .. import scalar as scal
from gof.python25 import partial from ..gof.python25 import partial
import compile from .. import compile
### set up the external interface ### set up the external interface
......
import os, sys import os, sys
import scipy.weave as weave import scipy.weave as weave
import gof.utils from ..gof import utils
""" """
...@@ -796,7 +796,7 @@ def blas_proto(): ...@@ -796,7 +796,7 @@ def blas_proto():
} }
""" """
@gof.utils.memoize @utils.memoize
def ldflags(): def ldflags():
"""Return a list of libraries against which an Op's object file should be """Return a list of libraries against which an Op's object file should be
linked to benefit from a BLAS implementation. linked to benefit from a BLAS implementation.
......
...@@ -2,11 +2,11 @@ ...@@ -2,11 +2,11 @@
import elemwise_cgen as cgen import elemwise_cgen as cgen
import numpy import numpy
from gof import Op, Apply from .. import gof
import scalar from ..gof import Op, Apply
from scalar import Scalar from .. import scalar
import gof from ..scalar import Scalar
from gof.python25 import all from ..gof.python25 import all
from copy import copy from copy import copy
......
...@@ -3,16 +3,16 @@ ...@@ -3,16 +3,16 @@
# TODO: 0*x -> 0 # TODO: 0*x -> 0
import gof from .. import gof
from gof import opt from ..gof import opt
from elemwise import Elemwise, DimShuffle from elemwise import Elemwise, DimShuffle
import scalar from .. import scalar
import tensor as T import basic as T
import numpy as N import numpy as N
import operator import operator
import itertools import itertools
import sys import sys
import compile #to register the optimizer built by this file from .. import compile #to register the optimizer built by this file
# Utilities # Utilities
......
"""Random number generation for Theano graphs.""" """Random number generation for Theano graphs."""
import gof from .. import gof
import tensor import basic as tensor
import numpy import numpy
import functools import functools
from compile import SymbolicInputKit, SymbolicInput from ..compile import SymbolicInputKit, SymbolicInput
from copy import copy from copy import copy
class RandomFunction(gof.Op): class RandomFunction(gof.Op):
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论