MaskedConv2d¶
-
class
torchelie.nn.
MaskedConv2d
(in_chan, out_chan, ks, center, stride=1, bias=(1, 1))¶ A masked 2D convolution for PixelCNN
- Parameters
in_chan (int) – number of input channels
out_chan (int) – number of output channels
ks (int) – kernel size
center (bool) – whereas central pixel is masked or not
stride (int) – stride, defaults to 1
bias (2-tuple of ints) – A spatial bias. Either the spatial dimensions of the input for a different bias at each location, or (1, 1) for the same bias everywhere (default)
-
forward
(x)¶
-
bias
: Optional[torch.Tensor]¶
-
dilation
: Tuple[int, …]¶
-
groups
: int¶
-
kernel_size
: Tuple[int, …]¶
-
out_channels
: int¶
-
output_padding
: Tuple[int, …]¶
-
padding
: Tuple[int, …]¶
-
padding_mode
: str¶
-
stride
: Tuple[int, …]¶
-
transposed
: bool¶
-
weight
: torch.Tensor¶