Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
cb3edced
提交
cb3edced
authored
6月 08, 2012
作者:
Frederic
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix typo and better formulation following code review.
上级
a52012e5
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
17 行增加
和
16 行删除
+17
-16
extending_theano.txt
doc/tutorial/extending_theano.txt
+12
-11
sparse.txt
doc/tutorial/sparse.txt
+4
-4
utils.py
theano/tensor/utils.py
+1
-1
没有找到文件。
doc/tutorial/extending_theano.txt
浏览文件 @
cb3edced
...
@@ -20,19 +20,19 @@ Inputs and Outputs are lists of Theano variables
...
@@ -20,19 +20,19 @@ Inputs and Outputs are lists of Theano variables
.. note::
.. note::
This tutorial do
not cover how to make an op that return
a view or
This tutorial do
es not cover how to make an op that returns
a view or
modify the values in it
'
s inputs. So all
modify the values in its inputs. So all
Op
done with the instruction
here MUST return newly allocated
Op
s created with the instructions
here MUST return newly allocated
memory or reuse the memory provided in the parameter
memory or reuse the memory provided in the parameter
output_storage of the :func:`perform` function. See :ref:`views_and_inplace`
output_storage of the :func:`perform` function. See :ref:`views_and_inplace`
for explanation of how to do this.
for explanation of how to do this.
If your Op return
a view or change the value i
n its inputs
If your Op return
s a view or change the value o
n its inputs
without doing as said in that page, Theano will run, but will
without doing as said in that page, Theano will run, but will
return good results
some graph
, but bad results for others.
return good results
for some graphs
, but bad results for others.
It is recommented that you run your tests in DebugMode (Theano flag
It is recommented that you run your tests in DebugMode (Theano flag
mode=DebugMode) that check
if your Op behave
correctly in this
mode=DebugMode) that check
s if your Op behaves
correctly in this
regard.
regard.
.. note::
.. note::
...
@@ -291,11 +291,12 @@ To verify the Rop method of the DoubleOp, you can use this:
...
@@ -291,11 +291,12 @@ To verify the Rop method of the DoubleOp, you can use this:
Running your tests
Running your tests
==================
==================
You can run ``nosetests`` in the Theano folder to run it as all
You can run ``nosetests`` in the Theano folder to run all of Theano's
Theano's tests including yours if inside such directory. You can run
tests, including yours if they are somewhere in the directory
``nosetests test_file.py`` to run only the tests in that file. You can
structure. You can run ``nosetests test_file.py`` to run only the
run ``nosetests test_file.py:test_DoubleRop`` to run only the tests
tests in that file. You can run ``nosetests
inside that test class. You can run ``nosetests
test_file.py:test_DoubleRop`` to run only the tests inside that test
class. You can run ``nosetests
test_file.py:test_DoubleRop.test_double_op`` to run only one
test_file.py:test_DoubleRop.test_double_op`` to run only one
particular test. More `nosetests
particular test. More `nosetests
<http://readthedocs.org/docs/nose/en/latest/>`_ documentation.
<http://readthedocs.org/docs/nose/en/latest/>`_ documentation.
...
...
doc/tutorial/sparse.txt
浏览文件 @
cb3edced
...
@@ -4,13 +4,13 @@
...
@@ -4,13 +4,13 @@
Sparse
Sparse
======
======
This is a very short tutorial on sparse with Theano. There is still
This is a very short tutorial on sparse
matrices
with Theano. There is still
some not well documented behavior like how we take care of the
some not well documented behavior like how we take care of the
gradient. There
is 2 types of gradient for sparse operation
. ``full
gradient. There
are 2 types of gradient for sparse operations
. ``full
gradient`` that compute a gradient for values even if they were 0 and
gradient`` that compute a gradient for values even if they were 0 and
the ``structured gradient`` that returns a gradient only for values
the ``structured gradient`` that returns a gradient only for values
that w
here not 0. You need to check the code to know wit
ch gradient an
that w
ere not 0. You need to check the code to know whi
ch gradient an
op implement
.
Op implements
.
More documentation in the :ref:`Sparse Library Reference <libdoc_sparse>`.
More documentation in the :ref:`Sparse Library Reference <libdoc_sparse>`.
...
...
theano/tensor/utils.py
浏览文件 @
cb3edced
...
@@ -6,7 +6,7 @@ from theano.gof.cc import hash_from_code
...
@@ -6,7 +6,7 @@ from theano.gof.cc import hash_from_code
def
hash_from_ndarray
(
data
):
def
hash_from_ndarray
(
data
):
"""Return a hash from an ndarray
"""Return a hash from an ndarray
It take care of the data, shapes, strides and dtype.
It take
s
care of the data, shapes, strides and dtype.
"""
"""
# We need to hash the shapes and strides as hash_from_code only hashes
# We need to hash the shapes and strides as hash_from_code only hashes
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论