niteshade.utils.check_batch_size

niteshade.utils.check_batch_size(y)

Check the batch size of input label data.

If batch size is 1, we need to reshape data for encoding/decoding. The output is not the actual batch size, rather it is checking whether batch size is 1 or not.

Parameters

y (np.array, torch.tensor) – labels

Returns

1 means 1, else means not 1

Return type

check (int)