ResBlock¶
-
class
torchelie.nn.
ResBlock
(in_channels: int, out_channels: int, stride: int = 1)¶ A Residual Block. Skip connection will be added if the number of input and output channels don’t match or stride > 1 is used.
- Parameters
in_channels (int) – input channels
out_channels (int) – output channels
stride (int) – stride
-
condition
(z: torch.Tensor) → None¶
-
forward
(x: torch.Tensor, z: Optional[torch.Tensor] = None) → torch.Tensor¶
-
remove_batchnorm
() → torchelie.nn.resblock.ResBlock¶
-
use_se
() → torchelie.nn.resblock.ResBlock¶
-
training
: bool¶