tensorflow::ops::RandomUniformInt

#include <random_ops.h>

ส่งออกจำนวนเต็มสุ่มจากการกระจายแบบเอกรูป

สรุป

ค่าที่สร้างขึ้นเป็นจำนวนเต็มที่มีช่วงสม่ำเสมอ [minval, maxval) ค่าต่ำสุด minval จะอยู่ในช่วง ในขณะที่ค่าสูงสุด maxval จะไม่อยู่ในช่วง

จำนวนเต็มสุ่มจะมีความเอนเอียงเล็กน้อย เว้นแต่ว่า maxval - minval จะเป็นกำลังสองที่พอดี ความเอนเอียงจะมีน้อยสำหรับค่า maxval - minval ที่น้อยกว่าช่วงของผลลัพธ์อย่างมาก (ไม่ว่าจะเป็น 2^32 หรือ 2^64 )

ข้อโต้แย้ง:

  • ขอบเขต: วัตถุ ขอบเขต
  • รูปร่าง: รูปร่างของเทนเซอร์ผลลัพธ์
  • minval: 0 มิติ ขอบเขตล่างแบบรวมของจำนวนเต็มที่สร้างขึ้น
  • maxval: 0 มิติ ขอบเขตบนสุดที่ไม่รวมค่าใดๆ ของจำนวนเต็มที่สร้างขึ้น

คุณลักษณะเสริม (ดูที่ Attrs ):

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

การส่งคืนสินค้า:

  • Output : เทนเซอร์ที่มีรูปร่างตามที่ระบุ ซึ่งบรรจุด้วยจำนวนเต็มสุ่มแบบสม่ำเสมอ

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

RandomUniformInt (const :: tensorflow::Scope & scope, :: tensorflow::Input shape, :: tensorflow::Input minval, :: tensorflow::Input maxval)
RandomUniformInt (const :: tensorflow::Scope & scope, :: tensorflow::Input shape, :: tensorflow::Input minval, :: tensorflow::Input maxval, const RandomUniformInt::Attrs & attrs)

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

operation
output

หน้าที่สาธารณะ

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

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

Seed (int64 x)
Seed2 (int64 x)

โครงสร้าง

tensorflow::ops::RandomUniformInt::Attrs

ตัวเลือกในการตั้งค่าแอตทริบิวต์สำหรับ RandomUniformInt

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

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

Operation operation

เอาต์พุต

::tensorflow::Output output

หน้าที่สาธารณะ

สุ่มแบบยูนิฟอร์มอิน

 RandomUniformInt(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input shape,
  ::tensorflow::Input minval,
  ::tensorflow::Input maxval
)

สุ่มแบบยูนิฟอร์มอิน

 RandomUniformInt(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input shape,
  ::tensorflow::Input minval,
  ::tensorflow::Input maxval,
  const RandomUniformInt::Attrs & attrs
)

โหนด

::tensorflow::Node * node() const 

ตัวดำเนินการ::เทนเซอร์โฟลว์::อินพุต

 operator::tensorflow::Input() const 

ตัวดำเนินการ::เทนเซอร์โฟลว์::เอาต์พุต

 operator::tensorflow::Output() const 

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

เมล็ดพันธุ์

Attrs Seed(
  int64 x
)

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

Attrs Seed2(
  int64 x
)