提交 9ef3814d authored 作者: Iban Harlouchet's avatar Iban Harlouchet

numpydoc for theano/tensor/nnet/Conv3D.py

上级 e16273c9
...@@ -44,8 +44,13 @@ from theano.gradient import grad_undefined ...@@ -44,8 +44,13 @@ from theano.gradient import grad_undefined
# the output function is only defined when dr, dc, dt are natural numbers. # the output function is only defined when dr, dc, dt are natural numbers.
class Conv3D(theano.Op): class Conv3D(theano.Op):
""" 3D `convolution` of multiple filters on a minibatch """
:note: does not flip the kernel, moves kernel with a user specified stride 3D `convolution` of multiple filters on a minibatch.
Notes
-----
Does not flip the kernel, moves kernel with a user specified stride.
""" """
__props__ = () __props__ = ()
...@@ -54,10 +59,17 @@ class Conv3D(theano.Op): ...@@ -54,10 +59,17 @@ class Conv3D(theano.Op):
def make_node(self, V, W, b, d): def make_node(self, V, W, b, d):
""" """
:param V: Visible unit, input(batch,row,column,time,in channel) Parameters
:param W: Weights, filter(out channel,row,column,time,in channel) ----------
:param b: bias, shape == (W.shape[0],) V
:param d: strides when moving the filter over the input(dx,dy,dt) Visible unit, input(batch,row,column,time,in channel)
W
Weights, filter(out channel,row,column,time,in channel)
b
bias, shape == (W.shape[0],)
d
strides when moving the filter over the input(dx,dy,dt)
""" """
V_ = T.as_tensor_variable(V) V_ = T.as_tensor_variable(V)
...@@ -539,28 +551,40 @@ _conv3D = Conv3D() ...@@ -539,28 +551,40 @@ _conv3D = Conv3D()
def conv3D(V, W, b, d): 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. Parameters
dimensions: (batch, row, column, time, in channel) ----------
:param W: Weights, filter. V
dimensions: (out channel, row, column, time ,in channel) Visible unit, input.
:param b: bias, shape == (W.shape[0],) Dimensions: (batch, row, column, time, in channel).
:param d: strides when moving the filter over the input(dx, dy, dt) W
Weights, filter.
:note: The order of dimensions does not correspond to the one in `conv2d`. Dimensions: (out channel, row, column, time ,in channel).
This is for optimization. b
Bias, shape == (W.shape[0],).
:note: The GPU implementation is very slow. You should use d
:func:`conv3d2d <theano.tensor.nnet.conv3d2d.conv3d>` or Strides when moving the filter over the input(dx, dy, dt).
:func:`conv3d_fft <theano.sandbox.cuda.fftconv.conv3d_fft>` for a
GPU graph instead. Notes
-----
:see: Someone made a script that shows how to swap the axes The order of dimensions does not correspond to the one in `conv2d`.
between both 3d convolution implementations in Theano. See This is for optimization.
the last `attachment
<https://groups.google.com/d/msg/theano-users/1S9_bZgHxVw/0cQR9a4riFUJ>`_. The GPU implementation is very slow. You should use
:func:`conv3d2d <theano.tensor.nnet.conv3d2d.conv3d>` or
:func:`conv3d_fft <theano.sandbox.cuda.fftconv.conv3d_fft>` for a
GPU graph instead.
See Also
--------
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) return _conv3D(V, W, b, d)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论