diffengine.datasets.samplers
¶ Submodules¶ Package Contents¶ Classes¶
Bases: torch.utils.data.BatchSampler
Aspect ratio batch sampler.
A sampler wrapper for grouping images with similar aspect ratio into a same batch.
Args:¶sampler (Sampler): Base sampler. batch_size (int): Size of mini-batch. bucket_ids (str | None): The path of bucket ids. If
None
, thebucket ids will be calculated automatically. Default:
None
.
- drop_last (bool): If
True
, the sampler will drop the last batch ifits size would be less than
batch_size
.
Get the iterator of the sampler.
collections.abc.Generator
Get the length of the sampler.
int
sampler (torch.utils.data.Sampler) –
batch_size (int) –
bucket_ids (str | None) –
drop_last (bool) –
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4