class documentation
class SampleBatch(abc.ABC): (source)
Known subclasses: fiftyone.core.map.batcher.id_batch.SampleIdBatch
, fiftyone.core.map.batcher.slice_batch.SampleSliceBatch
A sample batch
Class Method | split |
Create a list of sample batches |
Method | create |
Create a sample collection from the batch |
Property | total |
Get the total number of samples in the batch |
@classmethod
@abc.abstractmethod
def split(cls, sample_collection:
@abc.abstractmethod
def split(cls, sample_collection:
SampleCollection[ T]
, num_workers: int
, batch_size: int | None
= None) -> list[ SampleBatch]
:
(source)
¶
overridden in
fiftyone.core.map.batcher.id_batch.SampleIdBatch
, fiftyone.core.map.batcher.slice_batch.SampleSliceBatch
Create a list of sample batches
@abc.abstractmethod
def create_subset(self, sample_collection:
def create_subset(self, sample_collection:
SampleCollection[ T]
) -> SampleCollection[ T]
:
(source)
¶
overridden in
fiftyone.core.map.batcher.id_batch.SampleIdBatch
, fiftyone.core.map.batcher.slice_batch.SampleSliceBatch
Create a sample collection from the batch
overridden in
fiftyone.core.map.batcher.id_batch.SampleIdBatch
, fiftyone.core.map.batcher.slice_batch.SampleSliceBatch
Get the total number of samples in the batch