Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
4e7de4bb
提交
4e7de4bb
authored
6月 16, 2014
作者:
Frederic
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fixed doc following code review.
上级
5708bccc
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
13 行增加
和
13 行删除
+13
-13
index.txt
doc/library/sparse/index.txt
+1
-1
typed_list.txt
doc/library/typed_list.txt
+3
-3
basic.py
theano/sparse/basic.py
+9
-9
没有找到文件。
doc/library/sparse/index.txt
浏览文件 @
4e7de4bb
...
@@ -149,7 +149,7 @@ List of Implemented Operations
...
@@ -149,7 +149,7 @@ List of Implemented Operations
The grad implemented is regular.
The grad implemented is regular.
- Transpose
- Transpose
- :func:`
T
ranspose <theano.sparse.basic.transpose>`.
- :func:`
t
ranspose <theano.sparse.basic.transpose>`.
The grad implemented is regular.
The grad implemented is regular.
- Basic Arithmetic
- Basic Arithmetic
...
...
doc/library/typed_list.txt
浏览文件 @
4e7de4bb
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
This is not in the released version 0.6.0, but will be in the next release (0.7 or 0.6.1).
This is not in the released version 0.6.0, but will be in the next release (0.7 or 0.6.1).
This is a type that represent
a list in Theano. All element
must have
This is a type that represent
s a list in Theano. All elements
must have
the same Theano type. Here is an example::
the same Theano type. Here is an example::
import theano.typed_list
import theano.typed_list
...
@@ -20,8 +20,8 @@ the same Theano type. Here is an example::
...
@@ -20,8 +20,8 @@ the same Theano type. Here is an example::
print f([[1, 2, 3], [4, 5]], [2])
print f([[1, 2, 3], [4, 5]], [2])
#[array([ 1., 2., 3.], dtype=float32), array([ 4., 5.], dtype=float32), array([ 2.], dtype=float32)]
#[array([ 1., 2., 3.], dtype=float32), array([ 4., 5.], dtype=float32), array([ 2.], dtype=float32)]
A second example with Scan. Scan do
n't have yet
direct support of
A second example with Scan. Scan do
esn't yet have
direct support of
TypedList, so you can only use it as non_sequences(not in sequences or
TypedList, so you can only use it as non_sequences
(not in sequences or
as outputs).::
as outputs).::
import theano.typed_list
import theano.typed_list
...
...
theano/sparse/basic.py
浏览文件 @
4e7de4bb
...
@@ -1112,8 +1112,8 @@ If you want to take only one element of a sparse matrix see
...
@@ -1112,8 +1112,8 @@ If you want to take only one element of a sparse matrix see
The above indexing methods are not supported because the return value
The above indexing methods are not supported because the return value
would be a sparse matrix rather than a sparse vector, which is a
would be a sparse matrix rather than a sparse vector, which is a
deviation from numpy indexing rule. This decision is made largely
deviation from numpy indexing rule. This decision is made largely
for keeping the consistency between numpy and theano. Subject
ed
to preserve consistency between numpy and theano. This may be revis
ed
to modification when sparse vector is
supported.
when sparse vectors are
supported.
:param x: Sparse matrix.
:param x: Sparse matrix.
:param index: Tuple of slice object.
:param index: Tuple of slice object.
...
@@ -1169,13 +1169,13 @@ class GetItemScalar(gof.op.Op):
...
@@ -1169,13 +1169,13 @@ class GetItemScalar(gof.op.Op):
get_item_scalar
=
GetItemScalar
()
get_item_scalar
=
GetItemScalar
()
"""Implement a subtensor of a sparse variable that take
"""Implement a subtensor of a sparse variable that take
two scalar as index and return a scalar.
two scalar
s
as index and return a scalar.
If you want to take a slice of a sparse matrix see
If you want to take a slice of a sparse matrix see
`GetItem2d` that return a sparse matrix.
`GetItem2d` that return
s
a sparse matrix.
:param x: Sparse matrix.
:param x: Sparse matrix.
:param index: Tuple of scalar
.
.
:param index: Tuple of scalar
s
.
:return: The item corresponding in `x`.
:return: The item corresponding in `x`.
...
@@ -1502,18 +1502,18 @@ def sp_sum(x, axis=None, sparse_grad=False):
...
@@ -1502,18 +1502,18 @@ def sp_sum(x, axis=None, sparse_grad=False):
axis.
axis.
It operates a reduction along the axis specified. When
It operates a reduction along the axis specified. When
`axis` is `None`, it is apply along all ax
i
s.
`axis` is `None`, it is apply along all ax
e
s.
:param x: Sparse matrix.
:param x: Sparse matrix.
:param axis: Axis along
the sum is apply
. Integers or `None`.
:param axis: Axis along
which the sum is applied
. Integers or `None`.
:param sparse_grad: `True` to have a structured grad. Boolean.
:param sparse_grad: `True` to have a structured grad. Boolean.
:return: The sum of `x` in a dense format.
:return: The sum of `x` in a dense format.
:note: The grad implementation is controlled with the `sparse_grad`
:note: The grad implementation is controlled with the `sparse_grad`
parameter. `True` will provide a structured grad and `False`
parameter. `True` will provide a structured grad and `False`
will provide a regular grad. For both choice, the grad
will provide a regular grad. For both choice
s
, the grad
return a sparse matrix having the same format as `x`.
return
s
a sparse matrix having the same format as `x`.
:note: This op does not return a sparse matrix, but a dense tensor
:note: This op does not return a sparse matrix, but a dense tensor
matrix.
matrix.
"""
"""
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论