提交 13c43940 authored 作者: Arnaud Bergeron's avatar Arnaud Bergeron

Fix most of the remaining warning for the doc.

上级 87bd3db4
.. ../../../../theano/sandbox/linalg/ops.py .. ../../../../theano/sandbox/linalg/ops.py
.. ../../../../theano/sandbox/linalg .. ../../../../theano/sandbox/linalg
.. _libdoc_linalg: .. _libdoc_sandbox_linalg:
=================================================================== ===================================================================
:mod:`sandbox.linalg` -- Linear Algebra Ops :mod:`sandbox.linalg` -- Linear Algebra Ops
......
...@@ -32,18 +32,20 @@ TODO: Give examples on how to use these things! They are pretty complicated. ...@@ -32,18 +32,20 @@ TODO: Give examples on how to use these things! They are pretty complicated.
Most of the more efficient GPU implementations listed below can be used Most of the more efficient GPU implementations listed below can be used
as an automatic replacement for nnet.conv2d by enabling specific graph as an automatic replacement for nnet.conv2d by enabling specific graph
optimizations. optimizations.
- :func:`conv2d_fft <theano.sandbox.cuda.fftconv.conv2d_fft>` - :func:`conv2d_fft <theano.sandbox.cuda.fftconv.conv2d_fft>` This
This is a GPU-only version of nnet.conv2d that uses an FFT transform is a GPU-only version of nnet.conv2d that uses an FFT transform
to perform the work. conv2d_fft should not be called directly as it to perform the work. conv2d_fft should not be used directly as
does not provide a gradient. Instead, use nnet.conv2d and allow it does not provide a gradient. Instead, use nnet.conv2d and
Theano's graph optimizer to replace it by the FFT version by setting allow Theano's graph optimizer to replace it by the FFT version
``THEANO_FLAGS=optimizer_including=conv_fft_valid:conv_fft_full`` by setting
'THEANO_FLAGS=optimizer_including=conv_fft_valid:conv_fft_full'
in your environement. This is not enabled by default because it in your environement. This is not enabled by default because it
has some restrictions on input and uses a lot more memory. Also note has some restrictions on input and uses a lot more memory. Also
that it requires CUDA >= 5.0, scikits.cuda >= 0.5.0 and PyCUDA to run. note that it requires CUDA >= 5.0, scikits.cuda >= 0.5.0 and
To deactivate the FFT optimization on a specific nnet.conv2d PyCUDA to run. To deactivate the FFT optimization on a specific
while the optimization flags are active, you can set its ``version`` nnet.conv2d while the optimization flags are active, you can set
parameter to ``'no_fft'``. To enable it for just one Theano function: its ``version`` parameter to ``'no_fft'``. To enable it for just
one Theano function:
.. code-block:: python .. code-block:: python
......
.. ../../../../theano/sandbox/slinalg.py .. ../../../../theano/sandbox/slinalg.py
.. _libdoc_linalg: .. _libdoc_slinalg:
=================================================================== ===================================================================
:mod:`tensor.slinalg` -- Linear Algebra Ops Using Scipy :mod:`tensor.slinalg` -- Linear Algebra Ops Using Scipy
......
...@@ -533,31 +533,33 @@ class Conv3D(theano.Op): ...@@ -533,31 +533,33 @@ class Conv3D(theano.Op):
return strutil.render_string(codeSource,locals()) return strutil.render_string(codeSource,locals())
_conv3D = Conv3D()
conv3D = Conv3D() def conv3D(V, W, b, d):
""" """
3D "convolution" of multiple filters on a minibatch 3D "convolution" of multiple filters on a minibatch
(does not flip the kernel, moves kernel with a user specified stride) (does not flip the kernel, moves kernel with a user specified stride)
:param V: Visible unit, input. :param V: Visible unit, input.
dimensions: (batch, row, column, time, in channel) dimensions: (batch, row, column, time, in channel)
:param W: Weights, filter. :param W: Weights, filter.
dimensions: (out channel, row, column, time ,in channel) dimensions: (out channel, row, column, time ,in channel)
:param b: bias, shape == (W.shape[0],) :param b: bias, shape == (W.shape[0],)
:param d: strides when moving the filter over the input(dx, dy, dt) :param d: strides when moving the filter over the input(dx, dy, dt)
:note: The order of dimensions does not correspond to the one in `conv2d`. :note: The order of dimensions does not correspond to the one in `conv2d`.
This is for optimization. This is for optimization.
:note: The GPU implementation is very slow. You should use :note: The GPU implementation is very slow. You should use
:func:`conv3d2d <theano.tensor.nnet.conv3d2d.conv3d>` for a GPU :func:`conv3d2d <theano.tensor.nnet.conv3d2d.conv3d>` for a
graph instead. GPU graph instead.
:see: Someone made a script that shows how to swap the axes between
both 3d convolution implementations in Theano. See the last
`attachment <https://groups.google.com/d/msg/theano-users/1S9_bZgHxVw/0cQR9a4riFUJ>`_.
:see: Someone made a script that shows how to swap the axes
between both 3d convolution implementations in Theano. See
the last `attachment
<https://groups.google.com/d/msg/theano-users/1S9_bZgHxVw/0cQR9a4riFUJ>`_.
""" """
return _conv3D(V, W, b, d)
def computeH(V,W,b,d): def computeH(V,W,b,d):
assert len(W.shape) == 5 assert len(W.shape) == 5
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论