Koleksiyonlar ile düzeninizi koruyun
İçeriği tercihlerinize göre kaydedin ve kategorilere ayırın.
tensor akışı:: işlem:: Rastgele Karışık
#include <random_ops.h>
Bir tensörü ilk boyutu boyunca rastgele karıştırır.
Özet
Tensör, 0 boyutu boyunca karıştırılır, böylece her bir value[j]
bir ve yalnızca bir output[i]
ile eşlenir. Örneğin, 3x2'lik bir tensör için oluşabilecek bir eşleme şöyledir:
[[1, 2], [[5, 6],
[3, 4], ==> [1, 2],
[5, 6]] [3, 4]]
Argümanlar:
- kapsam: Bir Kapsam nesnesi
- değer: Karıştırılacak tensör.
İsteğe bağlı özellikler (bkz. Attrs
):
- tohum:
seed
veya seed2
biri sıfırdan farklı olarak ayarlanırsa, rastgele sayı üreteci verilen tohum tarafından tohumlanır. Aksi takdirde rastgele bir tohumla tohumlanır. - tohum2: Tohum çarpışmasını önlemek için ikinci bir tohum.
İade:
-
Output
: value
ile aynı şekil ve tipte, ilk boyutu boyunca karıştırılmış bir tensör.
Genel statik işlevler |
---|
Seed (int64 x) | |
Seed2 (int64 x) | |
Genel özellikler
Kamu işlevleri
düğüm
::tensorflow::Node * node() const
operator::tensorflow::Input() const
operatör::tensorflow::Çıktı
operator::tensorflow::Output() const
Genel statik işlevler
Tohum
Attrs Seed(
int64 x
)
Tohum2
Attrs Seed2(
int64 x
)
Aksi belirtilmediği sürece bu sayfanın içeriği Creative Commons Atıf 4.0 Lisansı altında ve kod örnekleri Apache 2.0 Lisansı altında lisanslanmıştır. Ayrıntılı bilgi için Google Developers Site Politikaları'na göz atın. Java, Oracle ve/veya satış ortaklarının tescilli ticari markasıdır.
Son güncelleme tarihi: 2025-07-27 UTC.
[null,null,["Son güncelleme tarihi: 2025-07-27 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/r2.3/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/r2.3/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/r2.3/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/r2.3/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope)` & scope, ::`[tensorflow::Input](/versions/r2.3/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/r2.3/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope)` & scope, ::`[tensorflow::Input](/versions/r2.3/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` value, const `[RandomShuffle::Attrs](/versions/r2.3/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/r2.3/api_docs/cc/class/tensorflow/operation#classtensorflow_1_1_operation) |\n| [output](#classtensorflow_1_1ops_1_1_random_shuffle_1aa615db4848868b8d11a3ca57176b23be) | `::`[tensorflow::Output](/versions/r2.3/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/r2.3/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/r2.3/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/r2.3/api_docs/cc/struct/tensorflow/ops/random-shuffle/attrs) | Optional attribute setters for [RandomShuffle](/versions/r2.3/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```"]]