提交 78e26667 authored 作者: Arnaud Bergeron's avatar Arnaud Bergeron

Fix flake8 problems.

上级 919b5b0e
...@@ -1523,7 +1523,7 @@ def dnn_reduction_strides(shp, shuffle, slice): ...@@ -1523,7 +1523,7 @@ def dnn_reduction_strides(shp, shuffle, slice):
def test_dnn_reduction_strides(): def test_dnn_reduction_strides():
yield dnn_reduction_strides, (2, 3, 2), (1, 0, 2), ... yield dnn_reduction_strides, (2, 3, 2), (1, 0, 2), slice(None, None, None)
yield dnn_reduction_strides, (2, 3, 2), (0, 1, 2), slice(None, None, -1) yield dnn_reduction_strides, (2, 3, 2), (0, 1, 2), slice(None, None, -1)
......
...@@ -107,7 +107,7 @@ class BaseTest: ...@@ -107,7 +107,7 @@ class BaseTest:
M = self.get_host_tensor() M = self.get_host_tensor()
f = theano.function([M], [T.max(M, axis=axis), T.argmax(M, axis=axis)], f = theano.function([M], [T.max(M, axis=axis), T.argmax(M, axis=axis)],
name='shape:' + str(test_tensor.shape) + '/axis:' + str(axis) + '/HOST', mode=mode_without_gpu) name='shape:' + str(test_tensor.shape) + '/axis:' + str(axis) + '/HOST', mode=mode_without_gpu)
check_if_gpu_maxandargmax_not_in_graph(f) check_if_gpu_reduce_not_in_graph(f)
f(test_tensor) f(test_tensor)
theano_max, theano_argmax = f(test_tensor) theano_max, theano_argmax = f(test_tensor)
ref_max, ref_argmax = numpy_maxandargmax(test_tensor, axis=axis) ref_max, ref_argmax = numpy_maxandargmax(test_tensor, axis=axis)
...@@ -118,7 +118,7 @@ class BaseTest: ...@@ -118,7 +118,7 @@ class BaseTest:
M = self.get_gpu_tensor() M = self.get_gpu_tensor()
f = theano.function([M], [T.max(M, axis=axis), T.argmax(M, axis=axis)], f = theano.function([M], [T.max(M, axis=axis), T.argmax(M, axis=axis)],
name='shape:' + str(test_gpu_tensor.shape) + '/axis:' + str(axis) + '/GPU', mode=mode_with_gpu) name='shape:' + str(test_gpu_tensor.shape) + '/axis:' + str(axis) + '/GPU', mode=mode_with_gpu)
check_if_gpu_maxandargmax_in_graph(f) check_if_gpu_reduce_in_graph(f)
f(test_gpu_tensor) f(test_gpu_tensor)
theano_max, theano_argmax = f(test_gpu_tensor) theano_max, theano_argmax = f(test_gpu_tensor)
ref_max, ref_argmax = numpy_maxandargmax(test_host_tensor, axis=axis) ref_max, ref_argmax = numpy_maxandargmax(test_host_tensor, axis=axis)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论