Stay organized with collections
Save and categorize content based on your preferences.
tensorflow::ops::RandomShuffle
#include <random_ops.h>
Randomly shuffles a tensor along its first dimension.
Summary
The tensor is shuffled along dimension 0, such that each value[j]
is mapped to one and only one output[i]
. For example, a mapping that might occur for a 3x2 tensor is:
[[1, 2], [[5, 6],
[3, 4], ==> [1, 2],
[5, 6]] [3, 4]]
Arguments:
- scope: A Scope object
- value: The tensor to be shuffled.
Optional attributes (see Attrs
):
- seed: If either
seed
or seed2
are set to be non-zero, the random number generator is seeded by the given seed. Otherwise, it is seeded by a random seed.
- seed2: A second seed to avoid seed collision.
Returns:
Output
: A tensor of same shape and type as value
, shuffled along its first dimension.
Public static functions
|
Seed(int64 x)
|
|
Seed2(int64 x)
|
|
Public attributes
Public functions
node
::tensorflow::Node * node() const
operator::tensorflow::Input() const
operator::tensorflow::Output
operator::tensorflow::Output() const
Public static functions
Seed
Attrs Seed(
int64 x
)
Seed2
Attrs Seed2(
int64 x
)
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.
Last updated 2020-04-20 UTC.
[null,null,["Last updated 2020-04-20 UTC."],[],[],null,["# tensorflow::ops::RandomShuffle Class Reference\n\ntensorflow::ops::RandomShuffle\n==============================\n\n`#include \u003crandom_ops.h\u003e`\n\nRandomly shuffles a tensor along its first dimension.\n\nSummary\n-------\n\nThe tensor is shuffled along dimension 0, such that each `value[j]` is mapped to one and only one `output[i]`. For example, a mapping that might occur for a 3x2 tensor is:\n\n\n```text\n[[1, 2], [[5, 6],\n [3, 4], ==\u003e [1, 2],\n [5, 6]] [3, 4]]\n```\n\n\u003cbr /\u003e\n\nArguments:\n\n- scope: A [Scope](/versions/r1.15/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope) object\n- value: The tensor to be shuffled.\n\n\u003cbr /\u003e\n\nOptional attributes (see [Attrs](/versions/r1.15/api_docs/cc/struct/tensorflow/ops/random-shuffle/attrs#structtensorflow_1_1ops_1_1_random_shuffle_1_1_attrs)):\n\n- seed: If either `seed` or `seed2` are set to be non-zero, the random number generator is seeded by the given seed. Otherwise, it is seeded by a random seed.\n- seed2: A second seed to avoid seed collision.\n\n\u003cbr /\u003e\n\nReturns:\n\n- [Output](/versions/r1.15/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output): A tensor of same shape and type as `value`, shuffled along its first dimension.\n\n\u003cbr /\u003e\n\n| ### Constructors and Destructors ||\n|---|---|\n| [RandomShuffle](#classtensorflow_1_1ops_1_1_random_shuffle_1a85aad10494a449f347a9190a38280283)`(const ::`[tensorflow::Scope](/versions/r1.15/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope)` & scope, ::`[tensorflow::Input](/versions/r1.15/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` value)` ||\n| [RandomShuffle](#classtensorflow_1_1ops_1_1_random_shuffle_1abc84e7abae1c06e33c057531d633d13d)`(const ::`[tensorflow::Scope](/versions/r1.15/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope)` & scope, ::`[tensorflow::Input](/versions/r1.15/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` value, const `[RandomShuffle::Attrs](/versions/r1.15/api_docs/cc/struct/tensorflow/ops/random-shuffle/attrs#structtensorflow_1_1ops_1_1_random_shuffle_1_1_attrs)` & attrs)` ||\n\n| ### Public attributes ||\n|--------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------|\n| [operation](#classtensorflow_1_1ops_1_1_random_shuffle_1ad2db7b1173c07d36b1a6861b104d12a4) | [Operation](/versions/r1.15/api_docs/cc/class/tensorflow/operation#classtensorflow_1_1_operation) |\n| [output](#classtensorflow_1_1ops_1_1_random_shuffle_1aa615db4848868b8d11a3ca57176b23be) | `::`[tensorflow::Output](/versions/r1.15/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output) |\n\n| ### Public functions ||\n|--------------------------------------------------------------------------------------------------------------------------|------------------------|\n| [node](#classtensorflow_1_1ops_1_1_random_shuffle_1a85dbb40592105d985cc361386d997fba)`() const ` | `::tensorflow::Node *` |\n| [operator::tensorflow::Input](#classtensorflow_1_1ops_1_1_random_shuffle_1a8e09a4698ab0eee0183927b971046024)`() const ` | ` ` ` ` |\n| [operator::tensorflow::Output](#classtensorflow_1_1ops_1_1_random_shuffle_1a3c9d49616ac6d2149f729063a3d8ad4f)`() const ` | ` ` ` ` |\n\n| ### Public static functions ||\n|---------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------|\n| [Seed](#classtensorflow_1_1ops_1_1_random_shuffle_1a1ea6f68c5b00c8be84eca3aa1a825a7f)`(int64 x)` | [Attrs](/versions/r1.15/api_docs/cc/struct/tensorflow/ops/random-shuffle/attrs#structtensorflow_1_1ops_1_1_random_shuffle_1_1_attrs) |\n| [Seed2](#classtensorflow_1_1ops_1_1_random_shuffle_1a7cfb648b8a16f9e12113b7393ec0fde5)`(int64 x)` | [Attrs](/versions/r1.15/api_docs/cc/struct/tensorflow/ops/random-shuffle/attrs#structtensorflow_1_1ops_1_1_random_shuffle_1_1_attrs) |\n\n| ### Structs ||\n|-----------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [tensorflow::ops::RandomShuffle::Attrs](/versions/r1.15/api_docs/cc/struct/tensorflow/ops/random-shuffle/attrs) | Optional attribute setters for [RandomShuffle](/versions/r1.15/api_docs/cc/class/tensorflow/ops/random-shuffle#classtensorflow_1_1ops_1_1_random_shuffle). |\n\nPublic attributes\n-----------------\n\n### operation\n\n```text\nOperation operation\n``` \n\n### output\n\n```text\n::tensorflow::Output output\n``` \n\nPublic functions\n----------------\n\n### RandomShuffle\n\n```gdscript\n RandomShuffle(\n const ::tensorflow::Scope & scope,\n ::tensorflow::Input value\n)\n``` \n\n### RandomShuffle\n\n```gdscript\n RandomShuffle(\n const ::tensorflow::Scope & scope,\n ::tensorflow::Input value,\n const RandomShuffle::Attrs & attrs\n)\n``` \n\n### node\n\n```gdscript\n::tensorflow::Node * node() const \n``` \n\n### operator::tensorflow::Input\n\n```gdscript\n operator::tensorflow::Input() const \n``` \n\n### operator::tensorflow::Output\n\n```gdscript\n operator::tensorflow::Output() const \n``` \n\nPublic static functions\n-----------------------\n\n### Seed\n\n```text\nAttrs Seed(\n int64 x\n)\n``` \n\n### Seed2\n\n```text\nAttrs Seed2(\n int64 x\n)\n```"]]