Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
90c8f80b
提交
90c8f80b
authored
1月 23, 2016
作者:
Nicolas Ballas
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update doc
上级
77729ffa
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
46 行增加
和
33 行删除
+46
-33
conv.txt
doc/library/tensor/nnet/conv.txt
+5
-1
__init__.py
theano/tensor/nnet/__init__.py
+29
-22
abstract_conv.py
theano/tensor/nnet/abstract_conv.py
+12
-10
没有找到文件。
doc/library/tensor/nnet/conv.txt
浏览文件 @
90c8f80b
...
...
@@ -31,11 +31,15 @@
that will be replaced by an actual convolution implementation during
the optimization phase.
Since the abstract Op does not have any implementation, it will prevent
computations in the un-optimized graph, and cause problems with DebugMode,
test values, and when compiling with optimizer=None.
By default, if :ref:`cuDNN <libdoc_cuda_dnn>`
is available, we will use it, otherwise we will fall back to using the
gemm version (slower then cuDNN in most cases and uses more memory).
Both
cuDNN and the gemm version can be disabled using the Theano flags
Either
cuDNN and the gemm version can be disabled using the Theano flags
``optimizer_excluding=conv_dnn`` and ``optimizer_excluding=conv_gemm``,
respectively. In this case, we will fall back to using the legacy
convolution code, which is slower, but does not require extra memory.
...
...
theano/tensor/nnet/__init__.py
浏览文件 @
90c8f80b
...
...
@@ -43,30 +43,33 @@ def conv2d(input, filters, input_shape=None, filter_shape=None,
stack of 2D inputs with a set of 2D filters. The implementation is modelled
after Convolutional Neural Networks (CNN).
:type input: symbolic 4D tensor
:param input: mini-batch of feature map stacks, of shape
Parameters
----------
input: symbolic 4D tensor
Mini-batch of feature map stacks, of shape
(batch size, input channels, input rows, input columns).
See the optional parameter ``input_shape``.
:type
filters: symbolic 4D tensor
:param filters: s
et of filters used in CNN layer of shape
filters: symbolic 4D tensor
S
et of filters used in CNN layer of shape
(output channels, input channels, filter rows, filter columns).
See the optional parameter ``filter_shape``.
:type
input_shape: None, tuple/list of len 4 of int or Constant variable
:param input_shape:
The shape of the input parameter.
input_shape: None, tuple/list of len 4 of int or Constant variable
The shape of the input parameter.
Optional, possibly used to choose an optimal implementation.
You can give ``None`` for any element of the list to specify that this
element is not known at compile time.
:type
filter_shape: None, tuple/list of len 4 of int or Constant variable
:param filter_shape:
The shape of the filters parameter.
filter_shape: None, tuple/list of len 4 of int or Constant variable
The shape of the filters parameter.
Optional, possibly used to choose an optimal implementation.
You can give ``None`` for any element of the list to specify that this
element is not known at compile time.
:type
border_mode: str, int or tuple of two int
:param border_mode:
Either of the following:
border_mode: str, int or tuple of two int
Either of the following:
``'valid'``: apply filter wherever it completely overlaps with the
input. Generates output of shape: input shape - filter shape + 1
...
...
@@ -81,31 +84,35 @@ def conv2d(input, filters, input_shape=None, filter_shape=None,
``(int1, int2)``: pad input with a symmetric border of ``int1`` rows
and ``int2`` columns, then perform a valid convolution.
:type
subsample: tuple of len 2
:param subsample: f
actor by which to subsample the output.
subsample: tuple of len 2
F
actor by which to subsample the output.
Also called strides elsewhere.
:type
filter_flip: bool
:param filter_flip:
If ``True``, will flip the filter rows and columns
filter_flip: bool
If ``True``, will flip the filter rows and columns
before sliding them over the input. This operation is normally referred
to as a convolution, and this is the default. If ``False``, the filters
are not flipped and the operation is referred to as a cross-correlation.
:type
image_shape: None, tuple/list of len 4 of int or Constant variable
:param image_shape:
Deprecated alias for input_shape.
image_shape: None, tuple/list of len 4 of int or Constant variable
Deprecated alias for input_shape.
:param
kwargs: Any other keyword arguments are accepted for backwards
compatibility, but will be ignored.
kwargs: Any other keyword arguments are accepted for backwards
compatibility, but will be ignored.
:rtype: symbolic 4D tensor
:return: set of feature maps generated by convolutional layer. Tensor is
Returns
-------
Symbolic 4D tensor
Set of feature maps generated by convolutional layer. Tensor is
of shape (batch size, output channels, output rows, output columns)
:note: If CuDNN is available, it will be used on the
Notes
-----
If CuDNN is available, it will be used on the
GPU. Otherwise, it is the *CorrMM* convolution that will be used
"caffe style convolution".
:note:
This is only supported in Theano 0.8 or the development
This is only supported in Theano 0.8 or the development
version until it is released.
"""
...
...
theano/tensor/nnet/abstract_conv.py
浏览文件 @
90c8f80b
...
...
@@ -124,22 +124,24 @@ class BaseAbstractConv2d(Op):
Define an abstract convolution op that will be replaced with the
appropriate implementation
:type imshp: None, tuple/list of len 4 of int or Constant variable
:param imshp: The shape of the input parameter.
Parameters
----------
imshp: None, tuple/list of len 4 of int or Constant variable
The shape of the input parameter.
Optional, possibly used to choose an optimal implementation.
You can give ``None`` for any element of the list to specify that this
element is not known at compile time.
imshp is defined w.r.t the forward conv.
:type
kshp: None, tuple/list of len 4 of int or Constant variable
:param kshp:
The shape of the filters parameter.
kshp: None, tuple/list of len 4 of int or Constant variable
The shape of the filters parameter.
Optional, possibly used to choose an optimal implementation.
You can give ``None`` for any element of the list to specify that this
element is not known at compile time.
kshp is defined w.r.t the forward conv.
:type
border_mode: str, int or tuple of two int
:param border_mode:
Either of the following:
border_mode: str, int or tuple of two int
Either of the following:
``'valid'``: apply filter wherever it completely overlaps with the
input. Generates output of shape: input shape - filter shape + 1
...
...
@@ -154,12 +156,12 @@ class BaseAbstractConv2d(Op):
``(int1, int2)``: pad input with a symmetric border of ``int1`` rows
and ``int2`` columns, then perform a valid convolution.
:type
subsample: tuple of len 2
:param subsample: f
actor by which to subsample the output.
subsample: tuple of len 2
F
actor by which to subsample the output.
Also called strides elsewhere.
:type
filter_flip: bool
:param filter_flip:
If ``True``, will flip the filter rows and columns
filter_flip: bool
If ``True``, will flip the filter rows and columns
before sliding them over the input. This operation is normally referred
to as a convolution, and this is the default. If ``False``, the filters
are not flipped and the operation is referred to as a
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论