MCPcopy Create free account
hub / github.com/microsoft/TRELLIS / __init__

Method __init__

trellis/utils/data_utils.py:176–187  ·  view source on GitHub ↗
(
        self,
        dataset: Dataset,
        shuffle: bool = True,
        seed: int = 0,
        drop_last: bool = False,
        batch_size: int = 1,
    )

Source from the content-addressed store, hash-verified

174 """
175
176 def __init__(
177 self,
178 dataset: Dataset,
179 shuffle: bool = True,
180 seed: int = 0,
181 drop_last: bool = False,
182 batch_size: int = 1,
183 ) -> None:
184 assert hasattr(dataset, 'loads'), 'Dataset must have "loads" attribute to use BalancedResumableSampler'
185 super().__init__(dataset, shuffle, seed, drop_last)
186 self.batch_size = batch_size
187 self.loads = dataset.loads
188
189 def __iter__(self) -> Iterator:
190 if self.shuffle:

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected