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

NNet - added some long int casts to fprintf calls

上级 3f6cb8f9
...@@ -116,7 +116,7 @@ class SoftmaxWithBias(gof.Op): ...@@ -116,7 +116,7 @@ class SoftmaxWithBias(gof.Op):
if ((%(x)s->dimensions[1] != %(b)s->dimensions[0])) if ((%(x)s->dimensions[1] != %(b)s->dimensions[0]))
{ {
PyErr_Format(PyExc_ValueError, "number of columns in x (%%ld) does not match length of b (%%ld)", PyErr_Format(PyExc_ValueError, "number of columns in x (%%ld) does not match length of b (%%ld)",
%(x)s->dimensions[1], %(b)s->dimensions[0]); (long int)%(x)s->dimensions[1], (long int)%(b)s->dimensions[0]);
%(fail)s; %(fail)s;
} }
...@@ -554,7 +554,7 @@ class CrossentropySoftmaxArgmax1HotWithBias(gof.Op): ...@@ -554,7 +554,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 (%%ld) does not match length of y (%%ld)", PyErr_Format(PyExc_ValueError, "number of rows in x (%%ld) does not match length of y (%%ld)",
%(x)s->dimensions[0], %(y_idx)s->dimensions[0]); (long int)%(x)s->dimensions[0], (long int)%(y_idx)s->dimensions[0]);
%(fail)s; %(fail)s;
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论