เทนเซอร์โฟลว์:: ปฏิบัติการ:: สุ่มสุ่ม

#include <random_ops.h>

สุ่มสับเปลี่ยนเทนเซอร์ไปตามมิติแรก

สรุป

เทนเซอร์ถูกสับไปตามมิติ 0 เพื่อให้แต่ละ value[j] ถูกแมปกับ output[i] ตัวอย่างเช่น การแมปที่อาจเกิดขึ้นสำหรับเทนเซอร์ 3x2 คือ:

[[1, 2],       [[5, 6],
 [3, 4],  ==>   [1, 2],
 [5, 6]]        [3, 4]]

ข้อโต้แย้ง:

  • ขอบเขต: วัตถุ ขอบเขต
  • ค่า: เทนเซอร์ที่จะสับเปลี่ยน

แอ็ตทริบิวต์ทางเลือก (ดู Attrs ):

  • เมล็ด: หากเมล็ดใด seed หนึ่งหรือ seed2 ถูกตั้งค่าไม่เป็นศูนย์ เครื่องกำเนิดตัวเลขสุ่มจะถูกเพาะโดยเมล็ดที่กำหนด มิฉะนั้นจะถูกเพาะโดยเมล็ดแบบสุ่ม
  • seed2: เมล็ดที่สองเพื่อหลีกเลี่ยงการชนกันของเมล็ด

ผลตอบแทน:

  • Output : เทนเซอร์ที่มีรูปร่างและประเภทเดียวกันกับ value สับไปตามมิติแรก

ตัวสร้างและผู้ทำลาย

RandomShuffle (const :: tensorflow::Scope & scope, :: tensorflow::Input value)
RandomShuffle (const :: tensorflow::Scope & scope, :: tensorflow::Input value, const RandomShuffle::Attrs & attrs)

คุณลักษณะสาธารณะ

operation
output

งานสาธารณะ

node () const
::tensorflow::Node *
operator::tensorflow::Input () const
operator::tensorflow::Output () const

ฟังก์ชันคงที่สาธารณะ

Seed (int64 x)
Seed2 (int64 x)

โครงสร้าง

เทนเซอร์โฟลว์ :: ops :: RandomShuffle :: Attrs

ตัวตั้งค่าคุณลักษณะเสริมสำหรับ RandomShuffle

คุณลักษณะสาธารณะ

การดำเนินการ

Operation operation

เอาท์พุท

::tensorflow::Output output

งานสาธารณะ

สุ่มสุ่ม

 RandomShuffle(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input value
)

สุ่มสุ่ม

 RandomShuffle(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input value,
  const RandomShuffle::Attrs & attrs
)

โหนด

::tensorflow::Node * node() const 

ตัวดำเนินการ::tensorflow::อินพุต

 operator::tensorflow::Input() const 

ตัวดำเนินการ::tensorflow::เอาต์พุต

 operator::tensorflow::Output() const 

ฟังก์ชันคงที่สาธารณะ

เมล็ดพันธุ์

Attrs Seed(
  int64 x
)

เมล็ดพันธุ์2

Attrs Seed2(
  int64 x
)