jactorch.data.dataloader.dataloader#

Classes

Class DataLoaderPipeMaster

class DataLoaderPipeMaster[source]#

Bases: object

__init__(nr_workers)[source]#
__new__(**kwargs)#
send(data)[source]#

Class DataLoaderPipeSlave

class DataLoaderPipeSlave[source]#

Bases: object

__init__(on_recv_func)[source]#
__new__(**kwargs)#
recv_loop()[source]#
worker_init(queue)[source]#

Class JacDataLoader

class JacDataLoader[source]#

Bases: DataLoader

A customized dataloader class. It supports an customized initialization function on each worker, as well as the initialization of random seed on different workers. It will invoke jacinle.random.reset_global_seed to reset the random seed upon the initialization of each worker.

__init__(dataset, batch_size=1, shuffle=False, sampler=None, batch_sampler=None, num_workers=0, collate_fn=default_collate, pin_memory=False, drop_last=False, timeout=0, base_seed=None, worker_init_fn=None, worker_init_args=None, worker_init_kwargs=None, worker_recv_fn=None, **kwargs)[source]#
__new__(**kwargs)#
check_worker_number_rationality()#
send_to_worker(data)[source]#
batch_size: int#
dataset: Dataset#
drop_last: bool#
property multiprocessing_context#
num_workers: int#
pin_memory: bool#
pin_memory_device: str#
prefetch_factor: int#
sampler: Sampler#
timeout: float#

Class JacDataLoaderMultiGPUWrapper

class JacDataLoaderMultiGPUWrapper[source]#

Bases: object

__init__(dataloader, gpus)[source]#
__new__(**kwargs)#
property unwrapped#