提交 577aee4a authored 作者: Frederic Bastien's avatar Frederic Bastien

Better error msg.

上级 8751b7da
...@@ -436,7 +436,7 @@ class GpuDownsampleFactorMax(Op): ...@@ -436,7 +436,7 @@ class GpuDownsampleFactorMax(Op):
#def perform(self, node, input_storage, output_storage): #def perform(self, node, input_storage, output_storage):
#raise NotImplementedError('only C is implemented') #raise NotImplementedError('only C is implemented')
def c_code_cache_version(self): def c_code_cache_version(self):
return (1) return (2)
def c_code(self, node, nodename, inp, out, sub): def c_code(self, node, nodename, inp, out, sub):
x, = inp x, = inp
z, = out z, = out
...@@ -462,7 +462,7 @@ class GpuDownsampleFactorMax(Op): ...@@ -462,7 +462,7 @@ class GpuDownsampleFactorMax(Op):
dims[3] += (xdim3%%(%(ds1)s)?1:0); dims[3] += (xdim3%%(%(ds1)s)?1:0);
} }
if(dims[3]>512){ if(dims[3]>512){
PyErr_SetString(PyExc_ValueError, "last dimention bigger then 512. This case is not implemented."); PyErr_Format(PyExc_ValueError, "GpuDownsampleFactorMax: last dimention size of %%d is bigger then 512. This case is not implemented.", dims[3]);
%(fail)s; %(fail)s;
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论