提交 8b390fb4 authored 作者: Olivier Delalleau's avatar Olivier Delalleau

Typo fixes

上级 b412823a
...@@ -2377,8 +2377,8 @@ class SpecifyShape(Op): ...@@ -2377,8 +2377,8 @@ class SpecifyShape(Op):
def c_code(self, node, nodename, inp, out, sub): def c_code(self, node, nodename, inp, out, sub):
if not isinstance(node.inputs[0], TensorVariable): if not isinstance(node.inputs[0], TensorVariable):
# The c code bellow support only Tensor. super.c_code # The C code below supports only Tensor. super.c_code
# will raise an exception to tell that there isn't c code # will raise an exception to tell that there is no C code
# for the other cases. # for the other cases.
return super(SpecifyShape, self).c_code(node, nodename, return super(SpecifyShape, self).c_code(node, nodename,
inp, out, sub) inp, out, sub)
...@@ -2389,8 +2389,8 @@ class SpecifyShape(Op): ...@@ -2389,8 +2389,8 @@ class SpecifyShape(Op):
return """ return """
if (PyArray_NDIM(%(iname)s) != PyArray_DIMS(%(shape)s)[0]) { if (PyArray_NDIM(%(iname)s) != PyArray_DIMS(%(shape)s)[0]) {
PyErr_Format(PyExc_AssertionError, PyErr_Format(PyExc_AssertionError,
"SpecifyShape: vector of shape have %%d element," "SpecifyShape: vector of shape has %%d elements,"
" but the input have %%d dimensions.", " but the input has %%d dimensions.",
PyArray_NDIM(%(iname)s), PyArray_NDIM(%(iname)s),
PyArray_DIMS(%(shape)s)[0]); PyArray_DIMS(%(shape)s)[0]);
%(fail)s; %(fail)s;
...@@ -2400,7 +2400,7 @@ class SpecifyShape(Op): ...@@ -2400,7 +2400,7 @@ class SpecifyShape(Op):
i))[0]; i))[0];
if (PyArray_DIMS(%(iname)s)[i] != shp) { if (PyArray_DIMS(%(iname)s)[i] != shp) {
PyErr_Format(PyExc_AssertionError, PyErr_Format(PyExc_AssertionError,
"SpecifyShape: dim %%d of input have shape %%d," "SpecifyShape: dim %%d of input has shape %%d,"
" expected %%d.", " expected %%d.",
i, PyArray_DIMS(%(iname)s)[i], i, PyArray_DIMS(%(iname)s)[i],
shp); shp);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论