提交 34db0b63 authored 作者: Li's avatar Li

pep8 changes

上级 86b7068e
...@@ -286,9 +286,8 @@ class DownsampleFactorMax(Op): ...@@ -286,9 +286,8 @@ class DownsampleFactorMax(Op):
ignore_border=self.ignore_border, ignore_border=self.ignore_border,
st=self.st, padding=self.padding)( st=self.st, padding=self.padding)(
x, maxout, gz)] x, maxout, gz)]
def c_headers(self): def c_headers(self):
#import ipdb; ipdb.set_trace()
#libs = super(DownsampleFactorMax, self).c_headers()
return ['<algorithm>'] return ['<algorithm>']
def c_code(self, node, name, inp, out, sub): def c_code(self, node, name, inp, out, sub):
...@@ -303,7 +302,6 @@ class DownsampleFactorMax(Op): ...@@ -303,7 +302,6 @@ class DownsampleFactorMax(Op):
int typenum = PyArray_ObjectType((PyObject*)%(x)s, 0); int typenum = PyArray_ObjectType((PyObject*)%(x)s, 0);
int z_r, z_c; // shape of the output int z_r, z_c; // shape of the output
int r, c; // shape of the padded_input int r, c; // shape of the padded_input
if(PyArray_NDIM(%(x)s)!=4) if(PyArray_NDIM(%(x)s)!=4)
{ {
PyErr_SetString(PyExc_ValueError, "x must be a 4d ndarray"); PyErr_SetString(PyExc_ValueError, "x must be a 4d ndarray");
...@@ -406,7 +404,8 @@ class DownsampleFactorMax(Op): ...@@ -406,7 +404,8 @@ class DownsampleFactorMax(Op):
""" % locals() """ % locals()
def c_code_cache_version(self): def c_code_cache_version(self):
return (0,5) return (0, 5)
class DownsampleFactorMaxGrad(Op): class DownsampleFactorMaxGrad(Op):
__props__ = ('ds', 'ignore_border', 'st', 'padding') __props__ = ('ds', 'ignore_border', 'st', 'padding')
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论