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

Function load_data

fastai/basic_data.py:272–279  ·  view source on GitHub ↗

Load a saved `DataBunch` from `path/file`. `file` can be file-like (file or buffer)

(path:PathOrStr, file:PathLikeOrBinaryStream='data_save.pkl', bs:int=64, val_bs:int=None, num_workers:int=defaults.cpus,
              dl_tfms:Optional[Collection[Callable]]=None, device:torch.device=None, collate_fn:Callable=data_collate,
              no_check:bool=False, **kwargs)

Source from the content-addressed store, hash-verified

270 print(final_message)
271
272def load_data(path:PathOrStr, file:PathLikeOrBinaryStream='data_save.pkl', bs:int=64, val_bs:int=None, num_workers:int=defaults.cpus,
273 dl_tfms:Optional[Collection[Callable]]=None, device:torch.device=None, collate_fn:Callable=data_collate,
274 no_check:bool=False, **kwargs)->DataBunch:
275 "Load a saved `DataBunch` from `path/file`. `file` can be file-like (file or buffer)"
276 source = Path(path)/file if is_pathlike(file) else file
277 ll = torch.load(source, map_location='cpu') if defaults.device == torch.device('cpu') else torch.load(source)
278 return ll.databunch(path=path, bs=bs, val_bs=val_bs, num_workers=num_workers, dl_tfms=dl_tfms, device=device,
279 collate_fn=collate_fn, no_check=no_check, **kwargs)

Callers

nothing calls this directly

Calls 4

is_pathlikeFunction · 0.85
loadMethod · 0.45
deviceMethod · 0.45
databunchMethod · 0.45

Tested by

no test coverage detected