pad2d#

torch_brain.batching.pad2d(obj)[source]#

Wrap an object to specify that it (or any of its members) should be padded to the maximum length in the batch along its first two dimensions. This function is similar to pad except that padding is applied in two dimensions.

Parameters:

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