tf.keras.random.shuffle
Stay organized with collections Save and categorize content based on your preferences.
Shuffle the elements of a tensor uniformly at random along an axis.
tf.keras.random.shuffle( x, axis=0, seed=None )
Args |
x | The tensor to be shuffled. |
axis | An integer specifying the axis along which to shuffle. Defaults to 0 . |
seed | A Python integer or instance of keras.random.SeedGenerator . Used to make the behavior of the initializer deterministic. Note that an initializer seeded with an integer or None (unseeded) will produce the same random values across multiple calls. To get different random values across multiple calls, use as seed an instance of keras.random.SeedGenerator . |
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates. Some content is licensed under the numpy license.
Last updated 2024-06-07 UTC.
[null,null,["Last updated 2024-06-07 UTC."],[],[],null,["# tf.keras.random.shuffle\n\n\u003cbr /\u003e\n\n|---------------------------------------------------------------------------------------------------------------|\n| [View source on GitHub](https://github.com/keras-team/keras/tree/v3.3.3/keras/src/random/random.py#L193-L210) |\n\nShuffle the elements of a tensor uniformly at random along an axis. \n\n tf.keras.random.shuffle(\n x, axis=0, seed=None\n )\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Args ---- ||\n|--------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `x` | The tensor to be shuffled. |\n| `axis` | An integer specifying the axis along which to shuffle. Defaults to `0`. |\n| `seed` | A Python integer or instance of [`keras.random.SeedGenerator`](../../../tf/keras/random/SeedGenerator). Used to make the behavior of the initializer deterministic. Note that an initializer seeded with an integer or None (unseeded) will produce the same random values across multiple calls. To get different random values across multiple calls, use as seed an instance of [`keras.random.SeedGenerator`](../../../tf/keras/random/SeedGenerator). |\n\n\u003cbr /\u003e"]]