pyprobound.layers.pad.get_padding_layers
- get_padding_layers(alphabet, prev, left=0, right=0)
Layers for padding, with adjustment for variable length sequences.
Assumes input is left-aligned.
- Parameters:
alphabet (
Alphabet) – The alphabet used to encode sequences into tensors.prev (
Union[Table[Any],Layer]) – If used as the first layer, the table that will be passed as an input; otherwise, the layer that precedes it.left (
int) – The number of elements to pad on the left.right (
int) – The number of elements to pad on the right.
- Return type:
list[Layer]- Returns:
The layers needed to pad sequences with variable length sequences.