Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
e617dc50
提交
e617dc50
authored
9月 28, 2015
作者:
abergeron
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #3456 from nouiz/nanguard
[CRASH] in nanguardmode with pycobject
上级
545d463f
66623c32
显示空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
60 行增加
和
55 行删除
+60
-55
op.txt
doc/extending/op.txt
+2
-0
gradient.txt
doc/library/gradient.txt
+54
-0
basic.txt
doc/library/tensor/basic.txt
+0
-52
gradients.txt
doc/tutorial/gradients.txt
+1
-0
nanguardmode.py
theano/compile/nanguardmode.py
+3
-3
没有找到文件。
doc/extending/op.txt
浏览文件 @
e617dc50
...
@@ -533,6 +533,8 @@ These are the function required to work with gradient.grad().
...
@@ -533,6 +533,8 @@ These are the function required to work with gradient.grad().
the outputs) back to their corresponding shapes and return them as the
the outputs) back to their corresponding shapes and return them as the
output of the :func:`R_op` method.
output of the :func:`R_op` method.
:ref:`List of op with r op support <R_op_list>`.
Defining an Op: ``mul``
Defining an Op: ``mul``
=======================
=======================
...
...
doc/library/gradient.txt
浏览文件 @
e617dc50
...
@@ -20,5 +20,59 @@ function does the underlying work, and is more flexible, but is also more
...
@@ -20,5 +20,59 @@ function does the underlying work, and is more flexible, but is also more
awkward to use when :func:`gradient.grad` can do the job.
awkward to use when :func:`gradient.grad` can do the job.
Gradient related functions
==========================
.. automodule:: theano.gradient
.. automodule:: theano.gradient
:members:
:members:
.. _R_op_list:
List of Implemented R op
========================
See the :ref:`gradient tutorial <tutcomputinggrads>` for the R op documentation.
list of ops that support R-op:
* with test [Most is tensor/tests/test_rop.py]
* SpecifyShape
* MaxAndArgmax
* Subtensor
* IncSubtensor set_subtensor too
* Alloc
* Dot
* Elemwise
* Sum
* Softmax
* Shape
* Join
* Rebroadcast
* Reshape
* Flatten
* DimShuffle
* Scan [In scan_module/tests/test_scan.test_rop]
* without test
* Split
* ARange
* ScalarFromTensor
* AdvancedSubtensor1
* AdvancedIncSubtensor1
* AdvancedIncSubtensor
Partial list of ops without support for R-op:
* All sparse ops
* All linear algebra ops.
* PermuteRowElements
* Tile
* AdvancedSubtensor
* TensorDot
* Outer
* Prod
* MulwithoutZeros
* ProdWithoutZeros
* CAReduce(for max,... done for MaxAndArgmax op)
* MaxAndArgmax(only for matrix on axis 0 or 1)
doc/library/tensor/basic.txt
浏览文件 @
e617dc50
...
@@ -1746,55 +1746,3 @@ Gradient / Differentiation
...
@@ -1746,55 +1746,3 @@ Gradient / Differentiation
See the :ref:`gradient <libdoc_gradient>` page for complete documentation
See the :ref:`gradient <libdoc_gradient>` page for complete documentation
of the gradient module.
of the gradient module.
.. _R_op_list:
List of Implemented R op
========================
See the :ref:`gradient tutorial <tutcomputinggrads>` for the R op documentation.
list of ops that support R-op:
* with test [Most is tensor/tests/test_rop.py]
* SpecifyShape
* MaxAndArgmax
* Subtensor
* IncSubtensor set_subtensor too
* Alloc
* Dot
* Elemwise
* Sum
* Softmax
* Shape
* Join
* Rebroadcast
* Reshape
* Flatten
* DimShuffle
* Scan [In scan_module/tests/test_scan.test_rop]
* without test
* Split
* ARange
* ScalarFromTensor
* AdvancedSubtensor1
* AdvancedIncSubtensor1
* AdvancedIncSubtensor
Partial list of ops without support for R-op:
* All sparse ops
* All linear algebra ops.
* PermuteRowElements
* Tile
* AdvancedSubtensor
* TensorDot
* Outer
* Prod
* MulwithoutZeros
* ProdWithoutZeros
* CAReduce(for max,... done for MaxAndArgmax op)
* MaxAndArgmax(only for matrix on axis 0 or 1)
doc/tutorial/gradients.txt
浏览文件 @
e617dc50
...
@@ -238,6 +238,7 @@ array([[ 0., 0.],
...
@@ -238,6 +238,7 @@ array([[ 0., 0.],
as the input parameter, while the result of the *R-operator* has a shape similar
as the input parameter, while the result of the *R-operator* has a shape similar
to that of the output.
to that of the output.
:ref:`List of op with r op support <R_op_list>`.
Hessian times a Vector
Hessian times a Vector
======================
======================
...
...
theano/compile/nanguardmode.py
浏览文件 @
e617dc50
...
@@ -263,14 +263,14 @@ class NanGuardMode(Mode):
...
@@ -263,14 +263,14 @@ class NanGuardMode(Mode):
error
=
True
error
=
True
if
big_is_error
:
if
big_is_error
:
err
=
False
err
=
False
if
var
.
size
==
0
:
if
isinstance
(
var
,
theano
.
gof
.
type
.
CDataType
.
_cdata_type
)
:
err
=
False
err
=
False
elif
cuda
.
cuda_available
and
isinstance
(
var
,
cuda
.
CudaNdarray
):
elif
cuda
.
cuda_available
and
isinstance
(
var
,
cuda
.
CudaNdarray
):
err
=
(
f_gpuabsmax
(
var
.
reshape
(
var
.
size
))
>
1e10
)
err
=
(
f_gpuabsmax
(
var
.
reshape
(
var
.
size
))
>
1e10
)
elif
isinstance
(
var
,
theano
.
gof
.
type
.
CDataType
.
_cdata_type
):
err
=
False
elif
isinstance
(
var
,
np
.
random
.
mtrand
.
RandomState
):
elif
isinstance
(
var
,
np
.
random
.
mtrand
.
RandomState
):
err
=
False
err
=
False
elif
var
.
size
==
0
:
err
=
False
else
:
else
:
err
=
(
np
.
abs
(
var
)
.
max
()
>
1e10
)
err
=
(
np
.
abs
(
var
)
.
max
()
>
1e10
)
if
err
:
if
err
:
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论