Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
f0d6f48e
提交
f0d6f48e
authored
4月 28, 2013
作者:
Olivier Delalleau
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Small typos and formatting fixes
上级
5a7081d7
显示空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
18 行增加
和
17 行删除
+18
-17
install.txt
doc/install.txt
+2
-2
basic.txt
doc/library/tensor/basic.txt
+10
-10
basic.py
theano/tensor/basic.py
+6
-5
没有找到文件。
doc/install.txt
浏览文件 @
f0d6f48e
...
@@ -442,9 +442,9 @@ correctly (for example, for MKL this might be ``-lmkl -lguide -lpthread`` or
...
@@ -442,9 +442,9 @@ correctly (for example, for MKL this might be ``-lmkl -lguide -lpthread`` or
If you have problems linking with MKL, `Intel Line Advisor
If you have problems linking with MKL, `Intel Line Advisor
<http://software.intel.com/en-us/articles/intel-mkl-link-line-advisor>`_
<http://software.intel.com/en-us/articles/intel-mkl-link-line-advisor>`_
and `MKL User Guide
and
the
`MKL User Guide
<http://software.intel.com/sites/products/documentation/doclib/mkl_sa/11/mkl_userguide_lnx/index.htm>`_
<http://software.intel.com/sites/products/documentation/doclib/mkl_sa/11/mkl_userguide_lnx/index.htm>`_
can help you find the correct flag to use.
can help you find the correct flag
s
to use.
.. _gpu_linux:
.. _gpu_linux:
...
...
doc/library/tensor/basic.txt
浏览文件 @
f0d6f48e
...
@@ -646,30 +646,30 @@ dimensions, see :meth:`_tensor_py_operators.dimshuffle`.
...
@@ -646,30 +646,30 @@ dimensions, see :meth:`_tensor_py_operators.dimshuffle`.
>>> x = T.concatenate([x0, x1[0], T.shape_padright(x2)], axis=1)
>>> x = T.concatenate([x0, x1[0], T.shape_padright(x2)], axis=1)
>>> # x.ndim == 2
>>> # x.ndim == 2
.. function:: stacklist(tensor_list)
.. function:: stacklist
s
(tensor_list)
:type tensor_list: an iterable that contain
tensors or iterable
:type tensor_list: an iterable that contain
s either tensors or other
with at the end tensors.
iterables of the same type as `tensor_list` (in other words, this
:param tensor_list: tensors to be
is a tree whose leaves are tensors).
stacken
d together.
:param tensor_list: tensors to be stacke
d together.
Recursivly stack lists of tensors to maintain similar structure.
Recursiv
e
ly stack lists of tensors to maintain similar structure.
This function can create a tensor from a shaped list of scalars
This function can create a tensor from a shaped list of scalars
:
>>> from theano.tensor import stacklists, scalars, matrices
>>> from theano.tensor import stacklists, scalars, matrices
>>> from theano import function
>>> from theano import function
>>> a,
b,c,
d = scalars('abcd')
>>> a,
b, c,
d = scalars('abcd')
>>> X = stacklists([[a, b], [c, d]])
>>> X = stacklists([[a, b], [c, d]])
>>> f = function([a, b, c, d], X)
>>> f = function([a, b, c, d], X)
>>> f(1, 2, 3, 4)
>>> f(1, 2, 3, 4)
>>> # array([[ 1., 2.], [ 3., 4.]], dtype=float32)
>>> # array([[ 1., 2.], [ 3., 4.]], dtype=float32)
We can also stack arbitrarily shaped tensors. Here we stack matrices into
We can also stack arbitrarily shaped tensors. Here we stack matrices into
a 2 by 2 grid
.
a 2 by 2 grid
:
>>> from numpy import ones
>>> from numpy import ones
>>> a,
b,c,d,
= matrices('abcd')
>>> a,
b, c, d
= matrices('abcd')
>>> X = stacklists([[a, b], [c, d]])
>>> X = stacklists([[a, b], [c, d]])
>>> f = function([a, b, c, d], X)
>>> f = function([a, b, c, d], X)
>>> x = ones((4, 4), 'float32')
>>> x = ones((4, 4), 'float32')
...
...
theano/tensor/basic.py
浏览文件 @
f0d6f48e
...
@@ -8236,13 +8236,14 @@ def diag(v, k=0):
...
@@ -8236,13 +8236,14 @@ def diag(v, k=0):
def
stacklists
(
arg
):
def
stacklists
(
arg
):
""" Recursivly stack lists of tensors to maintain similar structure
"""
Recursively stack lists of tensors to maintain similar structure.
This function can create a tensor from a shaped list of scalars
This function can create a tensor from a shaped list of scalars
:
>>> from theano.tensor import stacklists, scalars, matrices
>>> from theano.tensor import stacklists, scalars, matrices
>>> from theano import function
>>> from theano import function
>>> a,
b,c,
d = scalars('abcd')
>>> a,
b, c,
d = scalars('abcd')
>>> X = stacklists([[a, b], [c, d]])
>>> X = stacklists([[a, b], [c, d]])
>>> f = function([a, b, c, d], X)
>>> f = function([a, b, c, d], X)
>>> f(1, 2, 3, 4)
>>> f(1, 2, 3, 4)
...
@@ -8250,10 +8251,10 @@ def stacklists(arg):
...
@@ -8250,10 +8251,10 @@ def stacklists(arg):
[ 3., 4.]], dtype=float32)
[ 3., 4.]], dtype=float32)
We can also stack arbitrarily shaped tensors. Here we stack matrices into
We can also stack arbitrarily shaped tensors. Here we stack matrices into
a 2 by 2 grid
.
a 2 by 2 grid
:
>>> from numpy import ones
>>> from numpy import ones
>>> a,
b,c,d,
= matrices('abcd')
>>> a,
b, c, d
= matrices('abcd')
>>> X = stacklists([[a, b], [c, d]])
>>> X = stacklists([[a, b], [c, d]])
>>> f = function([a, b, c, d], X)
>>> f = function([a, b, c, d], X)
>>> x = ones((4, 4), 'float32')
>>> x = ones((4, 4), 'float32')
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论