提交 5928aeda authored 作者: Frederic's avatar Frederic

Give info on how to enable fft conv on only 1 Theano fct.

上级 ef2dfc15
...@@ -1695,6 +1695,7 @@ Gradient / Differentiation ...@@ -1695,6 +1695,7 @@ Gradient / Differentiation
:return: Returns lists of gradients with respect to `wrt` and `end`, :return: Returns lists of gradients with respect to `wrt` and `end`,
respectively. respectively.
.. versionadded:: 0.6.1
.. _R_op_list: .. _R_op_list:
......
...@@ -38,7 +38,15 @@ TODO: Give examples for how to use these things! They are pretty complicated. ...@@ -38,7 +38,15 @@ TODO: Give examples for how to use these things! They are pretty complicated.
that it requires CUDA >= 5.0, scikits.cuda >= 0.5.0 and PyCUDA to run. that it requires CUDA >= 5.0, scikits.cuda >= 0.5.0 and PyCUDA to run.
To desactivate the fft optimization on a specific nnet.conv2d To desactivate the fft optimization on a specific nnet.conv2d
while the optimization flags are active, you can set its parameters while the optimization flags are active, you can set its parameters
version to 'no_fft' version to 'no_fft'. To enable for just one Theano function:
.. code-block:: python
mode = theano.compile.get_default_mode()
mode = mode.including('conv_fft_valid', 'conv_fft_full')
f = theano.function(..., mode=mode)
- :func:`conv3D <theano.tensor.nnet.Conv3D.conv3D>` - :func:`conv3D <theano.tensor.nnet.Conv3D.conv3D>`
3D Convolution. Doesn't work on the GPU. 3D Convolution. Doesn't work on the GPU.
- :func:`conv3d_fft <theano.sandbox.cuda.fftconv.conv3d_fft>` - :func:`conv3d_fft <theano.sandbox.cuda.fftconv.conv3d_fft>`
...@@ -49,6 +57,15 @@ TODO: Give examples for how to use these things! They are pretty complicated. ...@@ -49,6 +57,15 @@ TODO: Give examples for how to use these things! They are pretty complicated.
This is not enabled by default because it has some restrictions on This is not enabled by default because it has some restrictions on
input and uses more memory. Also note that it requires CUDA >= 5.0, input and uses more memory. Also note that it requires CUDA >= 5.0,
scikits.cuda >= 0.5.0 and PyCUDA to run. scikits.cuda >= 0.5.0 and PyCUDA to run.
To enable for just one Theano function:
.. code-block:: python
mode = theano.compile.get_default_mode()
mode = mode.including('conv3d_fft', 'convgrad3d_fft', 'convtransp3d_fft')
f = theano.function(..., mode=mode)
- :func:`conv3d2d <theano.tensor.nnet.conv3d2d.conv3d>` - :func:`conv3d2d <theano.tensor.nnet.conv3d2d.conv3d>`
Another conv3d implementation that uses the conv2d with data reshaping. Another conv3d implementation that uses the conv2d with data reshaping.
It is faster in some cases than conv3d, specifically on the GPU. It is faster in some cases than conv3d, specifically on the GPU.
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论