Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
746eeac4
提交
746eeac4
authored
8月 27, 2020
作者:
Oriol (ZBook)
提交者:
Brandon T. Willard
8月 28, 2020
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
use sphinx section names
上级
6828cd5d
隐藏空白字符变更
内嵌
并排
正在显示
12 个修改的文件
包含
32 行增加
和
36 行删除
+32
-36
nanguardmode.py
theano/compile/nanguardmode.py
+2
-2
ops.py
theano/compile/ops.py
+2
-2
cmodule.py
theano/gof/cmodule.py
+2
-2
graph.py
theano/gof/graph.py
+2
-2
link.py
theano/gof/link.py
+2
-2
op.py
theano/gof/op.py
+2
-2
dnn.py
theano/gpuarray/dnn.py
+2
-2
gradient.py
theano/gradient.py
+4
-4
scan_utils.py
theano/scan_module/scan_utils.py
+2
-2
basic.py
theano/tensor/basic.py
+4
-4
elemwise.py
theano/tensor/elemwise.py
+8
-10
slinalg.py
theano/tensor/slinalg.py
+0
-2
没有找到文件。
theano/compile/nanguardmode.py
浏览文件 @
746eeac4
...
@@ -189,8 +189,8 @@ class NanGuardMode(Mode):
...
@@ -189,8 +189,8 @@ class NanGuardMode(Mode):
big_is_error : bool
big_is_error : bool
If True, raise an error when a value greater than 1e10 is encountered.
If True, raise an error when a value greater than 1e10 is encountered.
Note
Note
s
----
----
-
We ignore the linker parameter
We ignore the linker parameter
"""
"""
...
...
theano/compile/ops.py
浏览文件 @
746eeac4
...
@@ -680,8 +680,8 @@ class Rebroadcast(gof.Op):
...
@@ -680,8 +680,8 @@ class Rebroadcast(gof.Op):
-----
-----
Works inplace and works for CudaNdarrayType.
Works inplace and works for CudaNdarrayType.
Example
Example
s
-------
-------
-
`Rebroadcast((0, True), (1, False))(x)` would make `x` broadcastable in
`Rebroadcast((0, True), (1, False))(x)` would make `x` broadcastable in
axis 0 and not broadcastable in axis 1.
axis 0 and not broadcastable in axis 1.
...
...
theano/gof/cmodule.py
浏览文件 @
746eeac4
...
@@ -65,8 +65,8 @@ def debug_counter(name, every=1):
...
@@ -65,8 +65,8 @@ def debug_counter(name, every=1):
This is a utility function one may use when debugging.
This is a utility function one may use when debugging.
Example
Example
s
-------
-------
-
debug_counter('I want to know how often I run this line')
debug_counter('I want to know how often I run this line')
"""
"""
...
...
theano/gof/graph.py
浏览文件 @
746eeac4
...
@@ -866,8 +866,8 @@ def clone(i, o, copy_inputs=True, copy_orphans=None):
...
@@ -866,8 +866,8 @@ def clone(i, o, copy_inputs=True, copy_orphans=None):
object
object
The inputs and outputs of that copy.
The inputs and outputs of that copy.
Note
Note
s
----
----
-
A constant, if in the ``i`` list is not an orpha. So it will be
A constant, if in the ``i`` list is not an orpha. So it will be
copied depending of the ``copy_inputs`` parameter. Otherwise it
copied depending of the ``copy_inputs`` parameter. Otherwise it
...
...
theano/gof/link.py
浏览文件 @
746eeac4
...
@@ -393,8 +393,8 @@ class Linker(object):
...
@@ -393,8 +393,8 @@ class Linker(object):
operate in the same storage the fgraph uses, else independent storage
operate in the same storage the fgraph uses, else independent storage
will be allocated for the function.
will be allocated for the function.
Example
Example
s
-------
-------
-
e = x + y
e = x + y
fgraph = FunctionGraph([x, y], [e])
fgraph = FunctionGraph([x, y], [e])
fn = MyLinker(fgraph).make_function(inplace)
fn = MyLinker(fgraph).make_function(inplace)
...
...
theano/gof/op.py
浏览文件 @
746eeac4
...
@@ -187,8 +187,8 @@ class CLinkerObject(object):
...
@@ -187,8 +187,8 @@ class CLinkerObject(object):
Optional: Return a list of compile args recommended to compile the
Optional: Return a list of compile args recommended to compile the
code returned by other methods in this class.
code returned by other methods in this class.
Example
Example
s
-------
-------
-
return ['-ffast-math']
return ['-ffast-math']
Compiler arguments related to headers, libraries and search paths should
Compiler arguments related to headers, libraries and search paths should
...
...
theano/gpuarray/dnn.py
浏览文件 @
746eeac4
...
@@ -1748,8 +1748,8 @@ class GpuDnnPoolDesc(Op):
...
@@ -1748,8 +1748,8 @@ class GpuDnnPoolDesc(Op):
pad : tuple
pad : tuple
(padX, padY) or (padX, padY, padZ)
(padX, padY) or (padX, padY, padZ)
Note
Note
s
----
----
-
Not used anymore. Only needed to reload old pickled files.
Not used anymore. Only needed to reload old pickled files.
"""
"""
...
...
theano/gradient.py
浏览文件 @
746eeac4
...
@@ -1782,8 +1782,8 @@ def verify_grad(
...
@@ -1782,8 +1782,8 @@ def verify_grad(
no_debug_ref : bool
no_debug_ref : bool
Don't use DebugMode for the numerical gradient function.
Don't use DebugMode for the numerical gradient function.
Note
Note
s
----
----
-
This function does not support multiple outputs. In
This function does not support multiple outputs. In
tests/test_scan.py there is an experimental verify_grad that
tests/test_scan.py there is an experimental verify_grad that
covers that case as well by using random projections.
covers that case as well by using random projections.
...
@@ -2380,8 +2380,8 @@ def grad_clip(x, lower_bound, upper_bound):
...
@@ -2380,8 +2380,8 @@ def grad_clip(x, lower_bound, upper_bound):
>>> print(f(2.0))
>>> print(f(2.0))
[array(1.0), array(4.0)]
[array(1.0), array(4.0)]
Note
Note
s
----
----
-
We register an opt in tensor/opt.py that remove the GradClip.
We register an opt in tensor/opt.py that remove the GradClip.
So it have 0 cost in the forward and only do work in the grad.
So it have 0 cost in the forward and only do work in the grad.
...
...
theano/scan_module/scan_utils.py
浏览文件 @
746eeac4
...
@@ -1393,8 +1393,8 @@ def forced_replace(out, x, y):
...
@@ -1393,8 +1393,8 @@ def forced_replace(out, x, y):
x := sigmoid(wu)
x := sigmoid(wu)
forced_replace(out, x, y) := y*(1-y)
forced_replace(out, x, y) := y*(1-y)
Note
Note
s
----
----
-
When it find a match, it don't continue on the corresponding inputs.
When it find a match, it don't continue on the corresponding inputs.
"""
"""
if
out
is
None
:
if
out
is
None
:
...
...
theano/tensor/basic.py
浏览文件 @
746eeac4
...
@@ -225,8 +225,8 @@ def constant(x, name=None, ndim=None, dtype=None):
...
@@ -225,8 +225,8 @@ def constant(x, name=None, ndim=None, dtype=None):
ValueError
ValueError
`x` could not be expanded to have ndim dimensions.
`x` could not be expanded to have ndim dimensions.
Note
Note
s
----
----
-
We create a small cache of frequently used constant.
We create a small cache of frequently used constant.
This speed up the Merge optimization for big graph.
This speed up the Merge optimization for big graph.
We want to cache all scalar to don't merge as frequently constants.
We want to cache all scalar to don't merge as frequently constants.
...
@@ -4792,8 +4792,8 @@ def shape_padright(t, n_ones=1):
...
@@ -4792,8 +4792,8 @@ def shape_padright(t, n_ones=1):
def
shape_padaxis
(
t
,
axis
):
def
shape_padaxis
(
t
,
axis
):
"""Reshape `t` by inserting 1 at the dimension `axis`.
"""Reshape `t` by inserting 1 at the dimension `axis`.
Example
Example
s
-------
-------
-
>>> tensor = theano.tensor.tensor3()
>>> tensor = theano.tensor.tensor3()
>>> theano.tensor.shape_padaxis(tensor, axis=0)
>>> theano.tensor.shape_padaxis(tensor, axis=0)
DimShuffle{x,0,1,2}.0
DimShuffle{x,0,1,2}.0
...
...
theano/tensor/elemwise.py
浏览文件 @
746eeac4
...
@@ -80,8 +80,8 @@ class DimShuffle(COp):
...
@@ -80,8 +80,8 @@ class DimShuffle(COp):
inplace : bool, optional
inplace : bool, optional
If True (default), the output will be a view of the input.
If True (default), the output will be a view of the input.
Note
Note
s
----
----
-
If `j = new_order[i]` is an index, the output's ith dimension
If `j = new_order[i]` is an index, the output's ith dimension
will be the input's jth dimension.
will be the input's jth dimension.
If `new_order[i]` is `x`, the output's ith dimension will
If `new_order[i]` is `x`, the output's ith dimension will
...
@@ -91,8 +91,6 @@ class DimShuffle(COp):
...
@@ -91,8 +91,6 @@ class DimShuffle(COp):
If `input.broadcastable[i] == False` then `i` must be found in new_order.
If `input.broadcastable[i] == False` then `i` must be found in new_order.
Broadcastable dimensions, on the other hand, can be discarded.
Broadcastable dimensions, on the other hand, can be discarded.
Note
----
.. code-block:: python
.. code-block:: python
DimShuffle((False, False, False), ['x', 2, 'x', 0, 1])
DimShuffle((False, False, False), ['x', 2, 'x', 0, 1])
...
@@ -115,8 +113,8 @@ class DimShuffle(COp):
...
@@ -115,8 +113,8 @@ class DimShuffle(COp):
If the tensor has shape (1, 20), the resulting tensor will have shape
If the tensor has shape (1, 20), the resulting tensor will have shape
(20, ).
(20, ).
Example
Example
s
-------
-------
-
.. code-block:: python
.. code-block:: python
DimShuffle((), ['x']) # make a 0d (scalar) into a 1d vector
DimShuffle((), ['x']) # make a 0d (scalar) into a 1d vector
...
@@ -399,8 +397,8 @@ class Elemwise(OpenMPOp):
...
@@ -399,8 +397,8 @@ class Elemwise(OpenMPOp):
variable number of inputs), whereas the numpy function may
variable number of inputs), whereas the numpy function may
not have varargs.
not have varargs.
Note
Note
s
----
----
-
| Elemwise(add) represents + on tensors (x + y)
| Elemwise(add) represents + on tensors (x + y)
| Elemwise(add, {0 : 0}) represents the += operation (x += y)
| Elemwise(add, {0 : 0}) represents the += operation (x += y)
| Elemwise(add, {0 : 1}) represents += on the second argument (y += x)
| Elemwise(add, {0 : 1}) represents += on the second argument (y += x)
...
@@ -1330,8 +1328,8 @@ class CAReduce(Op):
...
@@ -1330,8 +1328,8 @@ class CAReduce(Op):
- List of dimensions that we want to reduce
- List of dimensions that we want to reduce
- If None, all dimensions are reduced
- If None, all dimensions are reduced
Note
Note
s
----
----
-
.. code-block:: python
.. code-block:: python
CAReduce(add) # sum (ie, acts like the numpy sum operation)
CAReduce(add) # sum (ie, acts like the numpy sum operation)
...
...
theano/tensor/slinalg.py
浏览文件 @
746eeac4
...
@@ -303,8 +303,6 @@ solve = Solve()
...
@@ -303,8 +303,6 @@ solve = Solve()
Solves the equation ``a x = b`` for x, where ``a`` is a matrix and
Solves the equation ``a x = b`` for x, where ``a`` is a matrix and
``b`` can be either a vector or a matrix.
``b`` can be either a vector or a matrix.
Note
Parameters
Parameters
----------
----------
a : `(M, M) symbolix matrix`
a : `(M, M) symbolix matrix`
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论