File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed
Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,9 @@ status](https://github.com/BirkhoffG/jax-dataloader/actions/workflows/nbdev.yaml
1111License] ( https://img.shields.io/github/license/BirkhoffG/jax-dataloader.svg )
1212<a href =" https://static.pepy.tech/badge/jax-dataloader " ><img src =" https://static.pepy.tech/badge/jax-dataloader " alt =" Downloads " ></a >
1313
14+ [ ** Overview** ] ( #overview ) \| [ ** Installation** ] ( #installation ) \|
15+ [ ** Documentation** ] ( https://birkhoffg.github.io/jax-dataloader )
16+
1417## Overview
1518
1619` jax_dataloader ` brings * pytorch-like* dataloader API to ` jax ` . It
@@ -45,6 +48,7 @@ dataloader = jdl.DataLoader(
4548 batch_size = 32 , # Batch size
4649 shuffle = True , # Shuffle the dataloader every iteration or not
4750 drop_last = False , # Drop the last batch or not
51+ generator = jdl.Generator() # Control the randomness of this dataloader
4852)
4953
5054batch = next (iter (dataloader)) # iterate next batch
Original file line number Diff line number Diff line change 1818 " \n " ,
1919 " \n " ,
2020 " \n " ,
21- " <a href=\" https://static.pepy.tech/badge/jax-dataloader\" ><img src=\" https://static.pepy.tech/badge/jax-dataloader\" alt=\" Downloads\" ></a>\n "
21+ " <a href=\" https://static.pepy.tech/badge/jax-dataloader\" ><img src=\" https://static.pepy.tech/badge/jax-dataloader\" alt=\" Downloads\" ></a>\n " ,
22+ " \n " ,
23+ " [**Overview**](#overview) \\ | [**Installation**](#installation) \\ |\n " ,
24+ " [**Documentation**](https://birkhoffg.github.io/jax-dataloader)\n "
2225 ]
2326 },
2427 {
5861 " batch_size=32, # Batch size \n " ,
5962 " shuffle=True, # Shuffle the dataloader every iteration or not\n " ,
6063 " drop_last=False, # Drop the last batch or not\n " ,
64+ " generator=jdl.Generator() # Control the randomness of this dataloader \n " ,
6165 " )\n " ,
6266 " \n " ,
6367 " batch = next(iter(dataloader)) # iterate next batch\n " ,
You can’t perform that action at this time.
0 commit comments