ResBlockBottleneck¶
-
class
torchelie.nn.
ResBlockBottleneck
(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_ch (int) – input channels
out_ch (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.ResBlockBottleneck¶
-
resnext
() → torchelie.nn.resblock.ResBlockBottleneck¶
-
upsample_instead
() → torchelie.nn.resblock.ResBlockBottleneck¶
-
use_se
() → torchelie.nn.resblock.ResBlockBottleneck¶
-
wide
(divisor: int = 2) → torchelie.nn.resblock.ResBlockBottleneck¶
-
training
: bool¶