MCPcopy Create free account
hub / github.com/SpenserCai/sd-webui-deoldify / create

Method create

fastai/basic_data.py:78–82  ·  view source on GitHub ↗

Create DeviceDataLoader from `dataset` with `bs` and `shuffle`: process using `num_workers`.

(cls, dataset:Dataset, bs:int=64, shuffle:bool=False, device:torch.device=defaults.device,
               tfms:Collection[Callable]=tfms, num_workers:int=defaults.cpus, collate_fn:Callable=data_collate, **kwargs:Any)

Source from the content-addressed store, hash-verified

76
77 @classmethod
78 def create(cls, dataset:Dataset, bs:int=64, shuffle:bool=False, device:torch.device=defaults.device,
79 tfms:Collection[Callable]=tfms, num_workers:int=defaults.cpus, collate_fn:Callable=data_collate, **kwargs:Any):
80 "Create DeviceDataLoader from `dataset` with `bs` and `shuffle`: process using `num_workers`."
81 return cls(DataLoader(dataset, batch_size=bs, shuffle=shuffle, num_workers=num_workers, **kwargs),
82 device=device, tfms=tfms, collate_fn=collate_fn)
83
84class DataBunch():
85 "Bind `train_dl`,`valid_dl` and `test_dl` in a data object."

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected