提交 1b4784a9 authored 作者: Arnaud Bergeron's avatar Arnaud Bergeron

Fix flake8 and names.

上级 aa0982ea
import itertools
import theano import theano
from theano.tensor.nnet.tests import test_abstract_conv from theano.tensor.nnet.tests import test_abstract_conv
from theano.sandbox.cuda import float32_shared_constructor as gpu_shared from theano.sandbox.cuda import float32_shared_constructor as gpu_shared
......
import itertools
from nose.plugins.skip import SkipTest from nose.plugins.skip import SkipTest
from theano.tensor.nnet.tests import test_abstract_conv from theano.tensor.nnet.tests import test_abstract_conv
......
import numpy import numpy
import unittest import unittest
import itertools
import theano import theano
from theano import tensor from theano import tensor
...@@ -242,7 +241,7 @@ class TestConv2d(unittest.TestCase): ...@@ -242,7 +241,7 @@ class TestConv2d(unittest.TestCase):
ds = [1, 1] ds = [1, 1]
db = (0, 0) db = (0, 0)
dflip = True in self.filter_flip dflip = True in self.filter_flip
dprovide_shape = True in self.provide_shapes dprovide_shape = True in self.provide_shape
for (i, f) in zip(self.inputs_shapes, self.filters_shapes): for (i, f) in zip(self.inputs_shapes, self.filters_shapes):
for provide_shape in self.provide_shape: for provide_shape in self.provide_shape:
self.tcase(i, f, ds, db, dflip, provide_shape) self.tcase(i, f, ds, db, dflip, provide_shape)
...@@ -273,6 +272,7 @@ class TestCpuConv2d(TestConv2d): ...@@ -273,6 +272,7 @@ class TestCpuConv2d(TestConv2d):
def setUp(self): def setUp(self):
super(TestCpuConv2d, self).setUp() super(TestCpuConv2d, self).setUp()
self.mode = theano.compile.mode.get_default_mode().excluding('conv_gemm') self.mode = theano.compile.mode.get_default_mode().excluding('conv_gemm')
def tcase(self, i, f, s, b, flip, provide_shape): def tcase(self, i, f, s, b, flip, provide_shape):
mode = self.mode mode = self.mode
o = self.get_output_shape(i, f, s, b) o = self.get_output_shape(i, f, s, b)
...@@ -300,7 +300,7 @@ class TestCpuConv2d(TestConv2d): ...@@ -300,7 +300,7 @@ class TestCpuConv2d(TestConv2d):
if fwd_OK: if fwd_OK:
self.run_fwd(inputs_shape=i, filters_shape=f, subsample=s, self.run_fwd(inputs_shape=i, filters_shape=f, subsample=s,
verify_grad=(gradweights_ok and gradinput_ok), verify_grad=(gradweight_OK and gradinput_OK),
mode=mode, provide_shape=provide_shape, mode=mode, provide_shape=provide_shape,
border_mode=b, filter_flip=flip, target_op=ConvOp) border_mode=b, filter_flip=flip, target_op=ConvOp)
else: else:
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论