提交 958219b1 authored 作者: Arnaud Bergeron's avatar Arnaud Bergeron

Flake8 for conv.py

上级 74f8fc3e
...@@ -3,6 +3,7 @@ import os ...@@ -3,6 +3,7 @@ import os
import theano import theano
from theano import config, gof from theano import config, gof
from theano.gof.util import MethodNotDefined
try: try:
import pygpu import pygpu
...@@ -10,12 +11,11 @@ try: ...@@ -10,12 +11,11 @@ try:
except ImportError: except ImportError:
pass pass
from six.moves import reduce
from .comp import NVCC_compiler
from .type import GpuArrayType from .type import GpuArrayType
from .basic_ops import (as_gpuarray_variable, GpuKernelBase, Kernel) from .basic_ops import as_gpuarray_variable, GpuKernelBase, Kernel
from theano.gof import utils from theano.gof import utils
class GpuConv(GpuKernelBase, gof.Op): class GpuConv(GpuKernelBase, gof.Op):
""" """
Implement the batched and stacked 2d convolution on the gpu. Implement the batched and stacked 2d convolution on the gpu.
...@@ -70,19 +70,19 @@ class GpuConv(GpuKernelBase, gof.Op): ...@@ -70,19 +70,19 @@ class GpuConv(GpuKernelBase, gof.Op):
raise ValueError(mode) raise ValueError(mode)
def __init__(self, border_mode, def __init__(self, border_mode,
subsample=(1, 1), subsample=(1, 1),
logical_img_hw=None, logical_img_hw=None,
logical_kern_hw=None, logical_kern_hw=None,
logical_kern_align_top=True, logical_kern_align_top=True,
version=-1, version=-1,
direction_hint=None, direction_hint=None,
verbose=0, verbose=0,
kshp=None, kshp=None,
imshp=None, imshp=None,
max_threads_dim0=None, max_threads_dim0=None,
nkern=None, nkern=None,
bsize=None, bsize=None,
fft_opt=True): fft_opt=True):
self.border_mode = border_mode self.border_mode = border_mode
self.subsample = subsample self.subsample = subsample
if logical_img_hw is not None: if logical_img_hw is not None:
...@@ -182,7 +182,7 @@ class GpuConv(GpuKernelBase, gof.Op): ...@@ -182,7 +182,7 @@ class GpuConv(GpuKernelBase, gof.Op):
def flops(self, inputs, outputs): def flops(self, inputs, outputs):
""" """
Useful with the hack in profilemode to print the MFlops. Useful with the hack in profilemode to print the MFlops.
""" """
images, kerns = inputs images, kerns = inputs
out, = outputs out, = outputs
......
...@@ -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/conv.py",
"sandbox/gpuarray/neighbours.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",
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论