conv2d

dragon.vm.tensorflow.nn.conv2d(
  input,
  filters,
  strides,
  padding,
  data_format='NHWC',
  dilations=None,
  name=None
)[source]

Apply the 2d 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]) – The stride(s) of sliding window.
  • padding (Union[{'VALID', 'SAME'}, Sequence[int]]) – The padding algorithm or padding sizes.
  • data_format ({'NCHW', 'NHWC'}, 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.