提交 5a4e2d0d authored 作者: Arnaud Bergeron's avatar Arnaud Bergeron

Flake8 for neihbours.py

上级 958219b1
...@@ -2,22 +2,19 @@ import os ...@@ -2,22 +2,19 @@ import os
import numpy import numpy
from theano import Op, Apply, config from theano import Op, Apply, config
from theano.gof import local_optimizer from theano.gof.util import MethodNotDefined
from theano.tensor.nnet.neighbours import Images2Neibs from theano.tensor.nnet.neighbours import Images2Neibs
import theano.tensor as T import theano.tensor as T
try: try:
import pygpu import pygpu
from pygpu import gpuarray, elemwise from pygpu import gpuarray
except ImportError: except ImportError:
pass pass
from .basic_ops import (as_gpuarray_variable, from .basic_ops import as_gpuarray_variable, GpuKernelBase, Kernel
host_from_gpu, gpu_from_host,
GpuKernelBase, Kernel)
from .opt import register_opt as register_gpu_opt, op_lifter from .opt import register_opt as register_gpu_opt, op_lifter
from .type import GpuArrayType from .type import GpuArrayType
from .comp import NVCC_compiler
class GpuImages2Neibs(GpuKernelBase, Images2Neibs, Op): class GpuImages2Neibs(GpuKernelBase, Images2Neibs, Op):
...@@ -45,7 +42,7 @@ class GpuImages2Neibs(GpuKernelBase, Images2Neibs, Op): ...@@ -45,7 +42,7 @@ class GpuImages2Neibs(GpuKernelBase, Images2Neibs, Op):
dtype=ten4.type.dtype)()]) dtype=ten4.type.dtype)()])
def c_code_cache_version(self): def c_code_cache_version(self):
return (10,1) return (10, 1)
def c_headers(self): def c_headers(self):
if pygpu.get_default_context().kind == 'opencl': if pygpu.get_default_context().kind == 'opencl':
......
...@@ -158,7 +158,6 @@ whitelist_flake8 = [ ...@@ -158,7 +158,6 @@ whitelist_flake8 = [
"sandbox/linalg/__init__.py", "sandbox/linalg/__init__.py",
"sandbox/linalg/tests/test_linalg.py", "sandbox/linalg/tests/test_linalg.py",
"sandbox/gpuarray/__init__.py", "sandbox/gpuarray/__init__.py",
"sandbox/gpuarray/neighbours.py",
"sandbox/gpuarray/tests/test_subtensor.py", "sandbox/gpuarray/tests/test_subtensor.py",
"sandbox/gpuarray/tests/test_scan.py", "sandbox/gpuarray/tests/test_scan.py",
"sandbox/gpuarray/tests/test_neighbours.py", "sandbox/gpuarray/tests/test_neighbours.py",
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论