Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
1bc6c56f
提交
1bc6c56f
authored
1月 19, 2015
作者:
abergeron
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #2416 from nouiz/doc
small doc update and interface addition.
上级
b9446ac0
a9ea825f
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
42 行增加
和
5 行删除
+42
-5
introduction.txt
doc/introduction.txt
+5
-3
index.txt
doc/library/index.txt
+1
-1
examples.txt
doc/tutorial/examples.txt
+9
-0
test_extra_ops.py
theano/tensor/tests/test_extra_ops.py
+14
-0
var.py
theano/tensor/var.py
+13
-1
没有找到文件。
doc/introduction.txt
浏览文件 @
1bc6c56f
...
@@ -195,11 +195,13 @@ Here is the state of that vision as of December 3th, 2013 (after Theano release
...
@@ -195,11 +195,13 @@ Here is the state of that vision as of December 3th, 2013 (after Theano release
* How to have `DebugMode` check it? Right now, DebugMode checks the computation non-lazily.
* How to have `DebugMode` check it? Right now, DebugMode checks the computation non-lazily.
* SIMD parallelism on the CPU comes from the compiler.
* SIMD parallelism on the CPU comes from the compiler.
* Multi-core parallelism
is only supported by Conv2d(not by default)
.
* Multi-core parallelism
support limited
.
If the external BLAS implementation supports it,
If the external BLAS implementation supports it,
there are also, gemm, gemv and ger that are parallelized.
many dot are parallelized via gemm, gemv and ger.
Also, element-wise operation are supported. See :ref:`tut_multi_cores`.
* No multi-node support.
* No multi-node support.
* M
any
, but not all NumPy functions/aliases are implemented.
* M
ost
, but not all NumPy functions/aliases are implemented.
* https://github.com/Theano/Theano/issues/1080
* https://github.com/Theano/Theano/issues/1080
* Wrapping an existing Python function in easy and documented.
* Wrapping an existing Python function in easy and documented.
* We know how to separate the shared variable memory
* We know how to separate the shared variable memory
...
...
doc/library/index.txt
浏览文件 @
1bc6c56f
...
@@ -43,7 +43,7 @@ There are also some top-level imports that you might find more convenient:
...
@@ -43,7 +43,7 @@ There are also some top-level imports that you might find more convenient:
.. function:: shared(...)
.. function:: shared(...)
Alias for :func:`
shared
.shared`
Alias for :func:`
theano.compile.sharedvalue
.shared`
.. class:: Param
.. class:: Param
...
...
doc/tutorial/examples.txt
浏览文件 @
1bc6c56f
...
@@ -276,6 +276,15 @@ expression that evaluates to a tensor of same shape and dtype.
...
@@ -276,6 +276,15 @@ expression that evaluates to a tensor of same shape and dtype.
.. _using_random_numbers:
.. _using_random_numbers:
.. note::
Theano shared variable broadcast pattern default to False for each
dimensions. Shared variable size can change over time, so we can't
use the shape to find the broadcastable pattern. If you want a
different pattern, just pass it as a parameter
``theano.shared(..., broadcastable=(True, False))``
Using Random Numbers
Using Random Numbers
====================
====================
...
...
theano/tensor/tests/test_extra_ops.py
浏览文件 @
1bc6c56f
...
@@ -286,6 +286,20 @@ class SqueezeTester(utt.InferShapeTester):
...
@@ -286,6 +286,20 @@ class SqueezeTester(utt.InferShapeTester):
utt
.
verify_grad
(
self
.
op
,
[
data
])
utt
.
verify_grad
(
self
.
op
,
[
data
])
def
test_var_interface
(
self
):
# same as test_op, but use a_theano_var.squeeze.
for
shape
,
broadcast
in
zip
(
self
.
shape_list
,
self
.
broadcast_list
):
data
=
numpy
.
random
.
random
(
size
=
shape
)
.
astype
(
theano
.
config
.
floatX
)
variable
=
tensor
.
TensorType
(
theano
.
config
.
floatX
,
broadcast
)()
f
=
theano
.
function
([
variable
],
variable
.
squeeze
())
expected
=
numpy
.
squeeze
(
data
)
tested
=
f
(
data
)
assert
tested
.
shape
==
expected
.
shape
assert
numpy
.
allclose
(
tested
,
expected
)
class
TestRepeatOp
(
utt
.
InferShapeTester
):
class
TestRepeatOp
(
utt
.
InferShapeTester
):
def
_possible_axis
(
self
,
ndim
):
def
_possible_axis
(
self
,
ndim
):
...
...
theano/tensor/var.py
浏览文件 @
1bc6c56f
...
@@ -585,7 +585,19 @@ class _tensor_py_operators:
...
@@ -585,7 +585,19 @@ class _tensor_py_operators:
def
choose
(
self
,
a
,
choices
,
out
=
None
,
mode
=
'raise'
):
def
choose
(
self
,
a
,
choices
,
out
=
None
,
mode
=
'raise'
):
"""Construct an array from an index array and a set of arrays to choose from."""
"""Construct an array from an index array and a set of arrays to choose from."""
return
theano
.
tensor
.
basic
.
choose
(
self
,
a
,
choices
,
out
=
None
,
mode
=
'raise'
)
return
theano
.
tensor
.
basic
.
choose
(
self
,
a
,
choices
,
out
=
None
,
mode
=
'raise'
)
def
squeeze
(
self
):
"""Remove broadcastable dimensions from
the shape of an array.
It returns the input array, but with the
broadcastable dimensions removed. This is
always `x` itself or a view into `x`.
"""
return
theano
.
tensor
.
extra_ops
.
squeeze
(
self
)
class
TensorVariable
(
_tensor_py_operators
,
Variable
):
class
TensorVariable
(
_tensor_py_operators
,
Variable
):
"""Subclass to add the tensor operators to the basic `Variable` class."""
"""Subclass to add the tensor operators to the basic `Variable` class."""
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论