Skip to content

Commit 8b36191

Browse files
Generate just one seed, rather than generating two seeds and then taking the first half of each seed.
rng.make_seeds(n) generates a tensor with shape (2,n): each seed is a 2-tuple. The previous code took the first half of each of two seed tuples. Instead, we generate just one 2-tuple. PiperOrigin-RevId: 606866194
1 parent e58176a commit 8b36191

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

site/en/tutorials/images/data_augmentation.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1273,7 +1273,7 @@
12731273
"source": [
12741274
"# Create a wrapper function for updating seeds.\n",
12751275
"def f(x, y):\n",
1276-
" seed = rng.make_seeds(2)[0]\n",
1276+
" seed = rng.make_seeds(1)[:, 0]\n",
12771277
" image, label = augment((x, y), seed)\n",
12781278
" return image, label"
12791279
]

0 commit comments

Comments
 (0)