module documentation

Undocumented

Function pad_to_multiple Pad a tensor's size to a multiple of a number.
def pad_to_multiple(tensor: torch.Tensor, multiple: int, *, mode: str, value: float = 0.0) -> torch.Tensor: (source)

Pad a tensor's size to a multiple of a number.

Parameters
tensor:torch.TensorTensor to pad.
multiple:intSize multiple to pad to.
mode:strPadding mode; see torch.nn.functional.pad.
value:floatPadding value; see torch.nn.functional.pad.
Returns
torch.TensorPadded tensor, or the original tensor if no padding was needed.