Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
8b28afc8
提交
8b28afc8
authored
8月 11, 2015
作者:
Iban Harlouchet
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
numpydoc for theano/sandbox/linalg/ops.py
上级
7f1b3bb1
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
11 行增加
和
4 行删除
+11
-4
ops.py
theano/sandbox/linalg/ops.py
+11
-4
没有找到文件。
theano/sandbox/linalg/ops.py
浏览文件 @
8b28afc8
...
...
@@ -64,7 +64,7 @@ except ImportError:
class
Hint
(
Op
):
"""
Provide arbitrary information to the optimizer
Provide arbitrary information to the optimizer
.
These ops are removed from the graph during canonicalization
in order to not interfere with other optimizations.
...
...
@@ -122,7 +122,7 @@ def remove_hint_nodes(node):
class
HintsFeature
(
object
):
"""
FunctionGraph Feature to track matrix properties
FunctionGraph Feature to track matrix properties
.
This is a similar feature to variable 'tags'. In fact, tags are one way
to provide hints.
...
...
@@ -209,8 +209,12 @@ class HintsFeature(object):
class
HintsOptimizer
(
Optimizer
):
"""Optimizer that serves to add HintsFeature as an fgraph feature.
"""
Optimizer that serves to add HintsFeature as an fgraph feature.
"""
def
__init__
(
self
):
Optimizer
.
__init__
(
self
)
...
...
@@ -231,6 +235,7 @@ def psd(v):
"""
Apply a hint that the variable `v` is positive semi-definite, i.e.
it is a symmetric matrix and :math:`x^T A x
\
ge 0` for any vector x.
"""
return
Hint
(
psd
=
True
,
symmetric
=
True
)(
v
)
...
...
@@ -294,6 +299,7 @@ def tag_solve_triangular(node):
"""
If a general solve() is applied to the output of a cholesky op, then
replace it with a triangular solve.
"""
if
node
.
op
==
solve
:
if
node
.
op
.
A_structure
==
'general'
:
...
...
@@ -396,12 +402,13 @@ def spectral_radius_bound(X, log2_exponent):
Returns upper bound on the largest eigenvalue of square symmetrix matrix X.
log2_exponent must be a positive-valued integer. The larger it is, the
slower and tighter the bound.
Values up to 5 should usually suffice.
The
slower and tighter the bound.
Values up to 5 should usually suffice.
The
algorithm works by multiplying X by itself this many times.
From V.Pan, 1990. "Estimating the Extremal Eigenvalues of a Symmetric
Matrix", Computers Math Applic. Vol 20 n. 2 pp 17-22.
Rq: an efficient algorithm, not used here, is defined in this paper.
"""
if
X
.
type
.
ndim
!=
2
:
raise
TypeError
(
'spectral_radius_bound requires a matrix argument'
,
X
)
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论