pad8#

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

Wrap an object to specify that it (or any of its members) should be padded to the maximum length in the batch. This function is similar to pad except that the padding length is rounded up to the nearest multiple of 8.

Parameters:

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