data
Functions
Unpack a batch to find a |
|
Checks if a given object has |
- lightning.pytorch.utilities.data.extract_batch_size(batch)
Unpack a batch to find a
torch.Tensor.- Return type:
- Returns:
len(tensor)when found, or1when it hits an empty or non iterable.
- lightning.pytorch.utilities.data.has_len_all_ranks(dataloader, strategy, allow_zero_length_dataloader_with_multiple_devices=False)
Checks if a given object has
__len__method implemented on all ranks.- Return type:
TypeGuard[Sized]
Was this page helpful?
Thanks for the feedback.