提交 9f009ab1 authored 作者: Olivier Delalleau's avatar Olivier Delalleau

Typo fix: then -> than

上级 e17f9005
...@@ -4464,6 +4464,7 @@ def set_subtensor(x, y, inplace=False, ...@@ -4464,6 +4464,7 @@ def set_subtensor(x, y, inplace=False,
return inc_subtensor(x, y, inplace, set_instead_of_inc=True, return inc_subtensor(x, y, inplace, set_instead_of_inc=True,
tolerate_inplace_aliasing=tolerate_inplace_aliasing) tolerate_inplace_aliasing=tolerate_inplace_aliasing)
def batched_dot(x, y): def batched_dot(x, y):
""" """
:param x: A Tensor with sizes e.g.: for 3D (dim1, dim3, dim2) :param x: A Tensor with sizes e.g.: for 3D (dim1, dim3, dim2)
...@@ -4476,7 +4477,7 @@ def batched_dot(x, y): ...@@ -4476,7 +4477,7 @@ def batched_dot(x, y):
>>> second = T.tensor3('second') >>> second = T.tensor3('second')
>>> result = batched_dot(first, second) >>> result = batched_dot(first, second)
:note: This is a subset of numpy.einsum, but we do not provide it for now. :note: This is a subset of numpy.einsum, but we do not provide it for now.
But numpy einsum is slower then dot or tensordot: But numpy einsum is slower than dot or tensordot:
http://mail.scipy.org/pipermail/numpy-discussion/2012-October/064259.html http://mail.scipy.org/pipermail/numpy-discussion/2012-October/064259.html
""" """
result, updates = theano.scan(fn=lambda x_mat, y_mat: result, updates = theano.scan(fn=lambda x_mat, y_mat:
...@@ -4486,6 +4487,7 @@ def batched_dot(x, y): ...@@ -4486,6 +4487,7 @@ def batched_dot(x, y):
non_sequences=None) non_sequences=None)
return result return result
def inc_subtensor(x, y, inplace=False, set_instead_of_inc=False, def inc_subtensor(x, y, inplace=False, set_instead_of_inc=False,
tolerate_inplace_aliasing=False): tolerate_inplace_aliasing=False):
"""Return x with the given subtensor incremented by y. """Return x with the given subtensor incremented by y.
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论