Shortcuts

replace_dp

torchdata.dataloader2.graph.replace_dp(graph: Dict[int, Tuple[IterDataPipe | MapDataPipe, Dict[int, Tuple[IterDataPipe | MapDataPipe, DataPipeGraph]]]], old_datapipe: IterDataPipe | MapDataPipe, new_datapipe: IterDataPipe | MapDataPipe) Dict[int, Tuple[IterDataPipe | MapDataPipe, Dict[int, Tuple[IterDataPipe | MapDataPipe, DataPipeGraph]]]]

Given the graph of DataPipe generated by traverse_dps function and the DataPipe to be replaced and the new DataPipe, return the new graph of DataPipe.

Docs

Access comprehensive developer documentation for PyTorch

View Docs

Tutorials

Get in-depth tutorials for beginners and advanced developers

View Tutorials

Resources

Find development resources and get your questions answered

View Resources