src.model.residual module#
- class src.model.residual.Residual(*args: Any, **kwargs: Any)[source]#
Bases:
ModuleResidual block with an optional projection shortcut.
Implements y = f(x) + x. When the input and output dimensions differ, a linear projection is applied to map x to the output dimension.