ConcatProjectionCombination¶
- class ConcatProjectionCombination(input_dims, output_dim=None, bias=True, dropout=0.0, activation=<class 'torch.nn.modules.linear.Identity'>, activation_kwargs=None)[source]¶
Bases:
ConcatCombination
Combine representations by concatenation follow by a linear projection and activation.
Initialize the combination.
- Parameters:
output_dim (
Optional
[int
]) – the output dimension. Defaults to the first input dimensionbias (
bool
) – whether to add a bias term in between the linear projection and the activationdropout (
float
) – dropout to use before the activationactivation (
Union
[str
,Module
,Type
[Module
],None
]) – the activation, or a hint thereofactivation_kwargs (
Optional
[Mapping
[str
,Any
]]) – additional keyword-based parameters used to instantiate the activation
- Raises:
ValueError – if input_dims is empty
Methods Summary
forward
(xs)Combine a sequence of individual representations.
Methods Documentation