tensorflow::ops::RandomUniform

#include <random_ops.h>

Hàm này xuất ra các giá trị ngẫu nhiên từ một phân phối đồng đều.

Bản tóm tắt

Các giá trị được tạo ra tuân theo phân bố đều trong khoảng [0, 1) . Giới hạn dưới 0 nằm trong khoảng này, trong khi giới hạn trên 1 bị loại trừ.

Luận điểm:

  • phạm vi: Một đối tượng Phạm vi
  • hình dạng: Hình dạng của tensor đầu ra.
  • dtype: Kiểu dữ liệu của đầu ra.

Các thuộc tính tùy chọn (xem Attrs ):

  • seed: Nếu seed hoặc seed2 được đặt khác 0, bộ tạo số ngẫu nhiên sẽ được gieo hạt bằng seed đã cho. Nếu không, nó sẽ được gieo hạt bằng một seed ngẫu nhiên.
  • seed2: Một seed thứ hai để tránh xung đột seed.

Trả về:

  • Output : Một tensor có hình dạng được chỉ định, chứa các giá trị ngẫu nhiên đồng đều.

Hàm khởi tạo và hàm hủy

RandomUniform (const :: tensorflow::Scope & scope, :: tensorflow::Input shape, DataType dtype)
RandomUniform (const :: tensorflow::Scope & scope, :: tensorflow::Input shape, DataType dtype, const RandomUniform::Attrs & attrs)

Thuộc tính công khai

operation
output

Chức năng công cộng

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

Các hàm tĩnh công khai

Seed (int64 x)
Seed2 (int64 x)

Cấu trúc

tensorflow::ops::RandomUniform::Attrs

Các thiết lập thuộc tính tùy chọn cho RandomUniform .

Thuộc tính công khai

hoạt động

Operation operation

đầu ra

::tensorflow::Output output

Chức năng công cộng

RandomUniform

 RandomUniform(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input shape,
  DataType dtype
)

RandomUniform

 RandomUniform(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input shape,
  DataType dtype,
  const RandomUniform::Attrs & attrs
)

nút

::tensorflow::Node * node() const 

operator::tensorflow::Input

 operator::tensorflow::Input() const 

operator::tensorflow::Output

 operator::tensorflow::Output() const 

Các hàm tĩnh công khai

Hạt giống

Attrs Seed(
  int64 x
)

Hạt giống2

Attrs Seed2(
  int64 x
)