- torch.nn.functional.pad â PyTorch 2.6 documentation
- confusing because
- the tuples passed to the padargument are flat even though youâre specifying basically pairs for each dimension
- if you pad more than one dimension, your padding integers from padare applied to dimensions in a back-to-front order, where the first pair are the left and right pads for the final dimension which are nominally the âcolumnsâ (and then the subsequent pairs pad the ârowsâ, then âbatchâ, then idk what youâd call it)