Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
a759089a
提交
a759089a
authored
7月 05, 2015
作者:
AdeB
提交者:
Xavier Bouthillier
8月 21, 2015
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add Sphinx documentation and image to illustrate sparse block dot
上级
5b604a49
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
20 行增加
和
2 行删除
+20
-2
blocksparse.png
doc/images/blocksparse.png
+0
-0
blocksparse.txt
doc/library/sandbox/blocksparse.txt
+16
-0
blocksparse.py
theano/sandbox/blocksparse.py
+2
-1
test_blocksparse.py
theano/sandbox/tests/test_blocksparse.py
+2
-1
没有找到文件。
doc/images/blocksparse.png
0 → 100644
浏览文件 @
a759089a
99.6 KB
doc/library/sandbox/blocksparse.txt
0 → 100644
浏览文件 @
a759089a
.. _libdoc_blocksparse:
===================================================================
:mod:`sandbox.blocksparse` -- Block sparse dot operations (gemv and outer)
===================================================================
.. module:: sandbox.blocksparse
:platform: Unix, Windows
:synopsis: Block sparse dot
.. moduleauthor:: LISA
API
===
.. automodule:: theano.sandbox.blocksparse
:members:
theano/sandbox/blocksparse.py
浏览文件 @
a759089a
...
@@ -17,7 +17,9 @@ class SparseBlockGemv(Op):
...
@@ -17,7 +17,9 @@ class SparseBlockGemv(Op):
o[b, j, :] += numpy.dot(h[b, i], W[iIdx[b, i], oIdx[b, j]])
o[b, j, :] += numpy.dot(h[b, i], W[iIdx[b, i], oIdx[b, j]])
where b, h, W, o iIdx, oIdx are defined in the docstring of make_node.
where b, h, W, o iIdx, oIdx are defined in the docstring of make_node.
.. image:: ../../images/blocksparse.png
.. image:: ../../images/blocksparse.png
:scale: 50
%
"""
"""
registered_opts
=
[]
registered_opts
=
[]
...
@@ -119,7 +121,6 @@ class SparseBlockOuter(Op):
...
@@ -119,7 +121,6 @@ class SparseBlockOuter(Op):
def
make_node
(
self
,
o
,
x
,
y
,
xIdx
,
yIdx
,
alpha
=
None
):
def
make_node
(
self
,
o
,
x
,
y
,
xIdx
,
yIdx
,
alpha
=
None
):
"""
"""
Compute the dot product of the specified pieces of vectors
Compute the dot product of the specified pieces of vectors
and matrices.
and matrices.
...
...
theano/sandbox/tests/test_blocksparse.py
浏览文件 @
a759089a
...
@@ -303,7 +303,8 @@ class BlockSparse_Gemv_and_Outer(unittest.TestCase):
...
@@ -303,7 +303,8 @@ class BlockSparse_Gemv_and_Outer(unittest.TestCase):
out
=
self
.
outer_op
(
o
,
x
,
y
,
xIdx
,
yIdx
)
out
=
self
.
outer_op
(
o
,
x
,
y
,
xIdx
,
yIdx
)
f
=
theano
.
function
([
o
,
x
,
y
,
xIdx
,
yIdx
],
out
,
on_unused_input
=
"warn"
)
f
=
theano
.
function
([
o
,
x
,
y
,
xIdx
,
yIdx
],
out
,
on_unused_input
=
"warn"
)
o_val
,
x_val
,
y_val
,
xIdx_val
,
yIdx_val
=
\
o_val
,
x_val
,
y_val
,
xIdx_val
,
yIdx_val
=
\
BlockSparse_Gemv_and_Outer
.
outer_data
()
BlockSparse_Gemv_and_Outer
.
outer_data
()
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论