Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
4e81ebac
提交
4e81ebac
authored
11月 04, 2014
作者:
serdyuk
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fixed typos, merged documentation, added references
上级
018aa096
显示空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
22 行增加
和
9 行删除
+22
-9
basic.txt
doc/library/tensor/basic.txt
+1
-0
neighbours.txt
doc/library/tensor/nnet/neighbours.txt
+3
-1
neighbours.py
theano/sandbox/neighbours.py
+2
-1
neighbours.py
theano/tensor/nnet/neighbours.py
+16
-7
没有找到文件。
doc/library/tensor/basic.txt
浏览文件 @
4e81ebac
...
@@ -1000,6 +1000,7 @@ Reductions
...
@@ -1000,6 +1000,7 @@ Reductions
:Returns: A new array holding the result.
:Returns: A new array holding the result.
.. _indexing:
Indexing
Indexing
========
========
...
...
doc/library/tensor/nnet/neighbours.txt
浏览文件 @
4e81ebac
...
@@ -88,7 +88,7 @@
...
@@ -88,7 +88,7 @@
.. note:: Currently, the function doesn't support tensors created with
.. note:: Currently, the function doesn't support tensors created with
`neib_step` different from default value. This means that it may be
`neib_step` different from default value. This means that it may be
impossible to compute the gradient in this case.
impossible to compute the gradient
of an error signal
in this case.
Example:
Example:
...
@@ -102,3 +102,5 @@
...
@@ -102,3 +102,5 @@
im_new_val = inv_window(neibs_val)
im_new_val = inv_window(neibs_val)
.. note:: The code will output the initial image array.
.. note:: The code will output the initial image array.
- See also: :ref:`indexing`, :ref:`lib_scan`
theano/sandbox/neighbours.py
浏览文件 @
4e81ebac
"""
"""
Neighbours was moved into theano.tensor.nnet.neighbours.
Neighbours was moved into theano.tensor.nnet.neighbours.
This file was created for compatibility
compatibility
.
This file was created for compatibility.
"""
"""
from
theano.tensor.nnet.neighbours
import
(
images2neibs
,
neibs2images
,
from
theano.tensor.nnet.neighbours
import
(
images2neibs
,
neibs2images
,
Images2Neibs
)
Images2Neibs
)
\ No newline at end of file
theano/tensor/nnet/neighbours.py
浏览文件 @
4e81ebac
...
@@ -439,16 +439,21 @@ def images2neibs(ten4, neib_shape, neib_step=None, mode='valid'):
...
@@ -439,16 +439,21 @@ def images2neibs(ten4, neib_shape, neib_step=None, mode='valid'):
.. code-block:: python
.. code-block:: python
idx = 0
idx = 0
for i in xrange(list 1 dim)
for i in xrange(list 1 dim):
for j in xrange(list 2 dim)
for j in xrange(list 2 dim):
for k in <image column coordinates>
for k in <image column coordinates>:
for l in <image row coordinates>
for l in <image row coordinates>:
output[idx,:]
output[idx,:]
= flattened version of ten4[i,j,l:l+r,k:k+c]
= flattened version of ten4[i,j,l:l+r,k:k+c]
idx += 1
idx += 1
(note: the op isn't necessarily implemented internally with these
for loops, they're just the easiest way to describe the output
.. note:: The operation isn't necessarily implemented internally with
pattern)
these for loops, they're just the easiest way to describe the output
pattern.
.. note:: Currently the step size should be chosen in the way that the
corresponding dimension :math:`i` (width or height) is equal to
:math:`n * step
\
_size_i + neib
\
_shape_i` for some :math:`n`
"""
"""
return
Images2Neibs
(
mode
)(
ten4
,
neib_shape
,
neib_step
)
return
Images2Neibs
(
mode
)(
ten4
,
neib_shape
,
neib_step
)
...
@@ -462,6 +467,10 @@ def neibs2images(neibs, neib_shape, original_shape, mode='valid'):
...
@@ -462,6 +467,10 @@ def neibs2images(neibs, neib_shape, original_shape, mode='valid'):
:param original_shape: original shape of the 4d tensor given to images2neib
:param original_shape: original shape of the 4d tensor given to images2neib
:return: Return a 4d tensor of shape `original_shape`.
:return: Return a 4d tensor of shape `original_shape`.
.. note:: Currently, the function doesn't support tensors created with
`neib_step` different from default value. This means that it may be
impossible to compute the gradient of an error signal in this case.
"""
"""
neibs
=
T
.
as_tensor_variable
(
neibs
)
neibs
=
T
.
as_tensor_variable
(
neibs
)
neib_shape
=
T
.
as_tensor_variable
(
neib_shape
)
neib_shape
=
T
.
as_tensor_variable
(
neib_shape
)
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论