提交 b09d1118 authored 作者: Frederic Bastien's avatar Frederic Bastien

Fix C error msg following code review

上级 129dbb14
...@@ -152,7 +152,7 @@ class Images2Neibs(Op): ...@@ -152,7 +152,7 @@ class Images2Neibs(Op):
grad_undefined(self, 2, neib_step)] grad_undefined(self, 2, neib_step)]
def c_code_cache_version(self): def c_code_cache_version(self):
return (6,) return (7,)
def perform(self, node, inp, out_): def perform(self, node, inp, out_):
ten4, neib_shape, neib_step = inp ten4, neib_shape, neib_step = inp
...@@ -323,16 +323,16 @@ class Images2Neibs(Op): ...@@ -323,16 +323,16 @@ class Images2Neibs(Op):
if (step_x <=0 || step_y <=0) if (step_x <=0 || step_y <=0)
{ {
PyErr_Format(PyExc_ValueError, PyErr_Format(PyExc_ValueError,
"neib_step wrong step ; values <= 0. Got %%d %%d.", "neib_step wrong step ; values <= 0. Got %%lld %%lld.",
step_x, step_y); (long long) step_x, (long long) step_y);
%(fail)s; %(fail)s;
} }
if (c <=0 || d <=0) if (c <=0 || d <=0)
{ {
PyErr_Format(PyExc_ValueError, PyErr_Format(PyExc_ValueError,
"neib_shape values <= 0. Got %%d %%d.", "neib_shape values <= 0. Got %%lld %%lld.",
c, d); (long long)c, (long long)d);
%(fail)s; %(fail)s;
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论