ConvTranspose2d

class dragon.vm.torch.nn.ConvTranspose2d(
  in_channels,
  out_channels,
  kernel_size,
  stride=1,
  padding=0,
  output_padding=0,
  groups=1,
  bias=True,
  dilation=1
)[source]

Apply the 2d deconvolution.

Examples:

m = torch.nn.ConvTranspose2d(2, 3, 2, stride=2)
x = torch.ones(2, 2, 4, 4)
y = m(x)

__init__

ConvTranspose2d.__init__(
  in_channels,
  out_channels,
  kernel_size,
  stride=1,
  padding=0,
  output_padding=0,
  groups=1,
  bias=True,
  dilation=1
)[source]

Create a ConvTranspose2d module.

Parameters:
  • in_channels (int) – The number of input channels.
  • out_channels (int) – The number of output channels.
  • kernel_size (Union[int, Sequence[int]]) – The size of convolution kernel.
  • stride (Union[int, Sequence[int]], optional, default=1) – The stride of sliding window.
  • padding (Union[int, Sequence[int]], optional, default=0) – The zero-padding size.
  • output_padding (int, optional, default=1) – The additional padding size.
  • groups (int, optional, default=1) – The number of groups to split input channels.
  • bias (bool, optional, default=True) – True to add a bias on the output.
  • dilation (Union[int, Sequence[int]], optional, default=1) – The rate of dilated convolution kernel.