提交 018aa096 authored 作者: serdyuk's avatar serdyuk

Moved neighbours into tensor.nnet

上级 b6ea8d67
...@@ -3,7 +3,7 @@ from theano import Op, Apply, tensor ...@@ -3,7 +3,7 @@ from theano import Op, Apply, tensor
from theano.gof import local_optimizer from theano.gof import local_optimizer
from theano.sandbox.cuda import cuda_available, GpuOp from theano.sandbox.cuda import cuda_available, GpuOp
from theano.sandbox.neighbours import Images2Neibs from theano.tensor.nnet.neighbours import Images2Neibs
if cuda_available: if cuda_available:
from theano.sandbox.cuda import CudaNdarrayType from theano.sandbox.cuda import CudaNdarrayType
......
...@@ -95,13 +95,13 @@ register_opt(name='gpu_constant_folding')( ...@@ -95,13 +95,13 @@ register_opt(name='gpu_constant_folding')(
# moved to the GPU. This list is used by an optimization. # moved to the GPU. This list is used by an optimization.
# Hopefully, we can keep this list up to date. # Hopefully, we can keep this list up to date.
import theano.tensor.signal.downsample import theano.tensor.signal.downsample
import theano.sandbox.neighbours import theano.tensor.nnet.neighbours
cpu_ops_moved_to_gpu = [ cpu_ops_moved_to_gpu = [
tensor.blas.Dot22, tensor.blas.Dot22Scalar, tensor.blas.Gemm, tensor.blas.Dot22, tensor.blas.Dot22Scalar, tensor.blas.Gemm,
tensor.blas.Gemv, tensor.blas.Ger, tensor.nnet.conv.ConvOp, tensor.blas.Gemv, tensor.blas.Ger, tensor.nnet.conv.ConvOp,
tensor.signal.downsample.DownsampleFactorMax, tensor.signal.downsample.DownsampleFactorMax,
tensor.signal.downsample.DownsampleFactorMaxGrad, tensor.signal.downsample.DownsampleFactorMaxGrad,
theano.sandbox.neighbours.Images2Neibs, theano.tensor.nnet.neighbours.Images2Neibs,
tensor.nnet.CrossentropySoftmaxArgmax1HotWithBias, tensor.nnet.CrossentropySoftmaxArgmax1HotWithBias,
tensor.nnet.CrossentropySoftmax1HotWithBiasDx, tensor.nnet.CrossentropySoftmax1HotWithBiasDx,
tensor.nnet.Softmax, tensor.nnet.SoftmaxWithBias, tensor.nnet.Softmax, tensor.nnet.SoftmaxWithBias,
......
...@@ -5,7 +5,7 @@ import theano.sandbox.cuda as cuda_ndarray ...@@ -5,7 +5,7 @@ import theano.sandbox.cuda as cuda_ndarray
if cuda_ndarray.cuda_available == False: if cuda_ndarray.cuda_available == False:
raise SkipTest('Optional package cuda disabled') raise SkipTest('Optional package cuda disabled')
import theano.sandbox.test_neighbours import theano.tensor.nnet.tests.test_neighbours
from theano.sandbox.cuda.neighbours import GpuImages2Neibs from theano.sandbox.cuda.neighbours import GpuImages2Neibs
if theano.config.mode == 'FAST_COMPILE': if theano.config.mode == 'FAST_COMPILE':
...@@ -14,7 +14,7 @@ else: ...@@ -14,7 +14,7 @@ else:
mode_with_gpu = theano.compile.mode.get_default_mode().including('gpu') mode_with_gpu = theano.compile.mode.get_default_mode().including('gpu')
class T_GpuImages2Neibs(theano.sandbox.test_neighbours.T_Images2Neibs): class T_GpuImages2Neibs(theano.tensor.nnet.tests.test_neighbours.T_Images2Neibs):
mode = mode_with_gpu mode = mode_with_gpu
op = GpuImages2Neibs op = GpuImages2Neibs
dtypes = ['float32'] dtypes = ['float32']
......
...@@ -2,7 +2,7 @@ import numpy ...@@ -2,7 +2,7 @@ import numpy
from theano import Op, Apply, config from theano import Op, Apply, config
from theano.gof import local_optimizer from theano.gof import local_optimizer
from theano.sandbox.neighbours import Images2Neibs from theano.tensor.nnet.neighbours import Images2Neibs
import theano.tensor as T import theano.tensor as T
try: try:
......
...@@ -4,11 +4,11 @@ import unittest ...@@ -4,11 +4,11 @@ import unittest
from theano.sandbox.gpuarray.tests.test_basic_ops import (mode_with_gpu, from theano.sandbox.gpuarray.tests.test_basic_ops import (mode_with_gpu,
mode_without_gpu) mode_without_gpu)
import theano.sandbox.test_neighbours import theano.tensor.nnet.tests.test_neighbours
from theano.sandbox.gpuarray.neighbours import GpuImages2Neibs from theano.sandbox.gpuarray.neighbours import GpuImages2Neibs
class T_GpuImages2Neibs(theano.sandbox.test_neighbours.T_Images2Neibs): class T_GpuImages2Neibs(theano.tensor.nnet.tests.test_neighbours.T_Images2Neibs):
mode = mode_with_gpu mode = mode_with_gpu
op = GpuImages2Neibs op = GpuImages2Neibs
dtypes = ['int64', 'float32', 'float64'] dtypes = ['int64', 'float32', 'float64']
......
差异被折叠。
...@@ -6,7 +6,7 @@ import theano ...@@ -6,7 +6,7 @@ import theano
from theano import shared, function from theano import shared, function
from theano.gof.python25 import any from theano.gof.python25 import any
import theano.tensor as T import theano.tensor as T
from neighbours import images2neibs, neibs2images, Images2Neibs from theano.tensor.nnet.neighbours import images2neibs, neibs2images, Images2Neibs
from theano.tests import unittest_tools from theano.tests import unittest_tools
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论