提交 fb583490 authored 作者: Frederic's avatar Frederic

small comment/err message fixes.

上级 bc1320a5
...@@ -2395,14 +2395,14 @@ CudaNdarray_set_strides(CudaNdarray *self, PyObject *value, void *closure) ...@@ -2395,14 +2395,14 @@ CudaNdarray_set_strides(CudaNdarray *self, PyObject *value, void *closure)
if (PyTuple_Check(value)){ if (PyTuple_Check(value)){
if (PyTuple_Size(value) != CudaNdarray_NDIM(self)){ if (PyTuple_Size(value) != CudaNdarray_NDIM(self)){
PyErr_SetString(PyExc_ValueError, PyErr_SetString(PyExc_ValueError,
"The new strides tuple must have the same lenght" "The new strides tuple must have the same length"
" as the number of dimensions"); " as the number of dimensions");
return -1; return -1;
} }
}else if (PyList_Check(value)){ }else if (PyList_Check(value)){
if (PyList_Size(value) != CudaNdarray_NDIM(self)){ if (PyList_Size(value) != CudaNdarray_NDIM(self)){
PyErr_SetString(PyExc_ValueError, PyErr_SetString(PyExc_ValueError,
"The new strides tuple must have the same lenght" "The new strides list must have the same length"
" as the number of dimensions"); " as the number of dimensions");
return -1; return -1;
} }
......
...@@ -289,7 +289,7 @@ def local_gpu_dimshuffle_0(node): ...@@ -289,7 +289,7 @@ def local_gpu_dimshuffle_0(node):
def local_gpu_specifyShape_0(node): def local_gpu_specifyShape_0(node):
""" """
specify_shape(host_from_gpu()) -> host_from_gpu(specify_shape) specify_shape(host_from_gpu()) -> host_from_gpu(specify_shape)
gpu_from_host(specify_shape) -> specifyshape(gpu_from_host) gpu_from_host(specify_shape) -> specify_shape(gpu_from_host)
""" """
if isinstance(node.op, tensor.SpecifyShape): if isinstance(node.op, tensor.SpecifyShape):
input = node.inputs[0] input = node.inputs[0]
...@@ -1443,7 +1443,7 @@ def tensor_to_cuda(x): ...@@ -1443,7 +1443,7 @@ def tensor_to_cuda(x):
def local_gpu_extract_diagonal(node): def local_gpu_extract_diagonal(node):
""" """
extract_diagonal(host_from_gpu()) -> host_from_gpu(extract_diagonal) extract_diagonal(host_from_gpu()) -> host_from_gpu(extract_diagonal)
gpu_from_host(extract_diagonal) -> specifyshape(gpu_from_host) gpu_from_host(extract_diagonal) -> extract_diagonal(gpu_from_host)
""" """
from theano.sandbox import linalg from theano.sandbox import linalg
if (isinstance(node.op, linalg.ops.ExtractDiag) and if (isinstance(node.op, linalg.ops.ExtractDiag) and
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论