add lenght attribute for pina dataloader

This commit is contained in:
Nicola Demo
2023-11-29 16:24:49 +01:00
parent 4639374961
commit 327d1aca5b

View File

@@ -238,3 +238,12 @@ class SamplePointLoader:
'condition': self.batch_data_conditions[idx_],
}
yield d
def __len__(self):
"""
Return the number of batches.
:return: The number of batches.
:rtype: int
"""
return len(self.batch_list)