nntoolbox.vision.components.res module¶
-
class
nntoolbox.vision.components.res.BottleneckPreActivation(in_channels, activation=<class 'torch.nn.modules.activation.ReLU'>, normalization=<class 'torch.nn.modules.batchnorm.BatchNorm2d'>)[source]¶ Bases:
nntoolbox.vision.components.res.ResNeXtBlock-
training: bool¶
-
-
class
nntoolbox.vision.components.res.ResNeXtBlock(branches, use_shake_shake)[source]¶ Bases:
torch.nn.modules.module.ModuleImplement a resnext block:
y = x + sum_i branch_i
-
forward(input)[source]¶ Defines the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Moduleinstance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
-
training: bool¶
-
-
class
nntoolbox.vision.components.res.ResidualBlock(in_channels)[source]¶ Bases:
torch.nn.modules.container.Sequential-
training: bool¶
-
-
class
nntoolbox.vision.components.res.ResidualBlockPreActivation(in_channels, activation=<class 'torch.nn.modules.activation.ReLU'>, normalization=<class 'torch.nn.modules.batchnorm.BatchNorm2d'>)[source]¶ Bases:
nntoolbox.vision.components.res.ResNeXtBlock-
training: bool¶
-
-
class
nntoolbox.vision.components.res.ResidualBlockPreActivationKer(in_channels, kernel, activation=<class 'torch.nn.modules.activation.ReLU'>, normalization=<class 'torch.nn.modules.batchnorm.BatchNorm2d'>)[source]¶ Bases:
nntoolbox.vision.components.res.ResNeXtBlock-
training: bool¶
-