提交 d5eefe0f authored 作者: James Bergstra's avatar James Bergstra

fixed typo in error format string in softmax

上级 a66acf6a
...@@ -582,7 +582,7 @@ class CrossentropySoftmaxArgmax1HotWithBias(gof.Op): ...@@ -582,7 +582,7 @@ class CrossentropySoftmaxArgmax1HotWithBias(gof.Op):
} }
if (%(x)s->dimensions[0] != %(y_idx)s->dimensions[0]) if (%(x)s->dimensions[0] != %(y_idx)s->dimensions[0])
{ {
PyErr_Format(PyExc_ValueError, "number of rows in x (%%i) does not match length of y (%%i)", PyErr_Format(PyExc_ValueError, "number of rows in x (%%zi) does not match length of y (%%zi)",
%(x)s->dimensions[0], %(y_idx)s->dimensions[0]); %(x)s->dimensions[0], %(y_idx)s->dimensions[0]);
%(fail)s; %(fail)s;
} }
...@@ -633,7 +633,7 @@ class CrossentropySoftmaxArgmax1HotWithBias(gof.Op): ...@@ -633,7 +633,7 @@ class CrossentropySoftmaxArgmax1HotWithBias(gof.Op):
def c_code_cache_version(self): def c_code_cache_version(self):
return (4,) + SoftmaxWithBias.c_code_cache_version() return (5,) + SoftmaxWithBias.c_code_cache_version()
def c_code(self, node, name, (x, b, y_idx), (nll, sm, am), sub): def c_code(self, node, name, (x, b, y_idx), (nll, sm, am), sub):
y_idx_type = node.inputs[2].type.dtype_specs()[1] y_idx_type = node.inputs[2].type.dtype_specs()[1]
am_type = y_idx_type am_type = y_idx_type
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论