pad#

torch_brain.data.pad(obj)[source]#

Wrap an object to specify that it (or any of its members) should be padded to the maximum length in the batch. The object can be any of the objects that PyTorch’s default_collate already supports.

Parameters:

obj – Can be tensors, numpy arrays, lists, tuples, or dictionaries.