convolution

dragon.vm.tensorflow.nn.convolution(
  input,
  filters,
  strides=None,
  padding='VALID',
  data_format=None,
  dilations=None,
  name=None,
  **kwargs
)[source]

Apply the n-dimension convolution.

The spatial output dimension is computed as:

\[\begin{cases} \text{DK}_{size} = dilation * (\text{K}_{size} - 1) + 1 \\ \text{Dim}_{out} = (\text{Dim}_{in} + 2 * pad - \text{DK}_{size}) / stride + 1 \end{cases} \]
Parameters:
  • input (dragon.Tensor) – The input tensor.
  • filters (dragon.Tensor) – The weight tensor.
  • strides (Sequence[int], optional) – The stride(s) of sliding window.
  • padding (Union[{'VALID', 'SAME'}, Sequence[int]], optional) – The padding algorithm or padding size(s).
  • data_format ({'NCHW', 'NCDHW', 'NHWC', 'NDHWC'}, optional) – The optional data format.
  • dilations (Sequence[int], optional) – The rate(s) of dilated kernel.
  • name (str, optional) – A optional name for the operation.
Returns:

dragon.Tensor – The output tensor.