You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/data_loaders_on_cpu_with_jax.ipynb
+7-5Lines changed: 7 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@
6
6
"id": "PUFGZggH49zp"
7
7
},
8
8
"source": [
9
-
"## Introduction to Data Loaders on CPU with JAX"
9
+
"# Introduction to Data Loaders on CPU with JAX"
10
10
]
11
11
},
12
12
{
@@ -15,6 +15,8 @@
15
15
"id": "3ia4PKEV5Dr8"
16
16
},
17
17
"source": [
18
+
"[](https://colab.research.google.com/github/jax-ml/jax-ai-stack/blob/main/docs/data_loaders_on_cpu_with_jax.ipynb)\n",
19
+
"\n",
18
20
"This tutorial explores different data loading strategies for using **JAX** on a single [**CPU**](https://jax.readthedocs.io/en/latest/glossary.html#term-CPU). While JAX doesn't include a built-in data loader, it seamlessly integrates with popular data loading libraries, including:\n",
"This section shows how to load the MNIST dataset using PyTorch's DataLoader, convert the data to NumPy arrays, and apply transformations to flatten and cast images."
268
270
]
@@ -614,7 +616,7 @@
614
616
"id": "Nm45ZTo6yrf5"
615
617
},
616
618
"source": [
617
-
"## Loading Data with TensorFlow Datasets (TFDS)\n",
619
+
"### Loading Data with TensorFlow Datasets (TFDS)\n",
618
620
"\n",
619
621
"This section demonstrates how to load the MNIST dataset using TFDS, fetch the full dataset for evaluation, and define a training generator for batch processing. GPU usage is explicitly disabled for TensorFlow."
620
622
]
@@ -816,7 +818,7 @@
816
818
"id": "-ryVkrAITS9Z"
817
819
},
818
820
"source": [
819
-
"## Loading Data with Grain\n",
821
+
"### Loading Data with Grain\n",
820
822
"\n",
821
823
"This section demonstrates how to load MNIST data using Grain, a data-loading library. You'll define a custom dataset class for Grain and set up a Grain DataLoader for efficient training."
822
824
]
@@ -1082,7 +1084,7 @@
1082
1084
"id": "oixvOI816qUn"
1083
1085
},
1084
1086
"source": [
1085
-
"## Loading Data with Hugging Face\n",
1087
+
"### Loading Data with Hugging Face\n",
1086
1088
"\n",
1087
1089
"This section demonstrates loading MNIST data using the Hugging Face `datasets` library. You'll format the dataset for JAX compatibility, prepare flattened images and one-hot-encoded labels, and define a training generator."
Copy file name to clipboardExpand all lines: docs/data_loaders_on_cpu_with_jax.md
+8-6Lines changed: 8 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -5,18 +5,20 @@ jupytext:
5
5
extension: .md
6
6
format_name: myst
7
7
format_version: 0.13
8
-
jupytext_version: 1.16.4
8
+
jupytext_version: 1.15.2
9
9
kernelspec:
10
10
display_name: Python 3
11
11
name: python3
12
12
---
13
13
14
14
+++ {"id": "PUFGZggH49zp"}
15
15
16
-
##Introduction to Data Loaders on CPU with JAX
16
+
# Introduction to Data Loaders on CPU with JAX
17
17
18
18
+++ {"id": "3ia4PKEV5Dr8"}
19
19
20
+
[](https://colab.research.google.com/github/jax-ml/jax-ai-stack/blob/main/docs/data_loaders_on_cpu_with_jax.ipynb)
21
+
20
22
This tutorial explores different data loading strategies for using **JAX** on a single [**CPU**](https://jax.readthedocs.io/en/latest/glossary.html#term-CPU). While JAX doesn't include a built-in data loader, it seamlessly integrates with popular data loading libraries, including:
This section shows how to load the MNIST dataset using PyTorch's DataLoader, convert the data to NumPy arrays, and apply transformations to flatten and cast images.
This section demonstrates how to load the MNIST dataset using TFDS, fetch the full dataset for evaluation, and define a training generator for batch processing. GPU usage is explicitly disabled for TensorFlow.
This section demonstrates how to load MNIST data using Grain, a data-loading library. You'll define a custom dataset class for Grain and set up a Grain DataLoader for efficient training.
This section demonstrates loading MNIST data using the Hugging Face `datasets` library. You'll format the dataset for JAX compatibility, prepare flattened images and one-hot-encoded labels, and define a training generator.
0 commit comments