AutoGANGenBlock(in_ch: int, out_ch: int, skips_ch: List[int], ks: int = 3, mode: str = 'nearest')¶
A block of the generator discovered by AutoGAN.
in_ch (int) – number of input channels
out_ch (int) – number of output channels
skips_ch (list of int) – a list with one element per incoming skip connection. Each element is the number of channels of the incoming skip connection.
ks (int) – kernel size of the convolutions
mode (str) – usampling mode, ‘nearest’ or ‘bilinear’
forward(x: torch.Tensor, skips: List[torch.Tensor] = ) → Tuple[torch.Tensor, torch.Tensor]¶
x (tensor) – input tensor
skips (list of tensor) – a tensor per incoming skip connection
- output tensor, intermediate value to use in the next block’s skip