plus_residual
PlusResidual
¶
Bases: torch.nn.Module
Wraps a layer such that the forward pass returns
x + self.layer(x)
Source code in pytorch_adapt\layers\plus_residual.py
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
|
__init__(layer)
¶
Parameters:
Name | Type | Description | Default |
---|---|---|---|
layer |
torch.nn.Module
|
The layer to be wrapped. |
required |
Source code in pytorch_adapt\layers\plus_residual.py
10 11 12 13 14 15 16 |
|