tensorflow::ops::Multinomial

#include <random_ops.h>

Lấy mẫu từ phân phối đa thức.

Bản tóm tắt

Luận điểm:

  • phạm vi: Một đối tượng Phạm vi
  • logits: Tensor 2 chiều có hình dạng [batch_size, num_classes] . Mỗi lát cắt [i, :] biểu thị xác suất logarit chưa chuẩn hóa cho tất cả các lớp.
  • num_samples: 0-D. Số lượng mẫu độc lập cần lấy cho mỗi lát cắt hàng.

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 nội bộ sẽ được gieo hạt bằng seed đã cho. Nếu không, một seed ngẫu nhiên sẽ được sử dụng.
  • seed2: Một seed thứ hai để tránh xung đột seed.

Trả về:

  • Output : Tensor 2 chiều có hình dạng [batch_size, num_samples] . Mỗi lát cắt [i, :] chứa các nhãn lớp được vẽ với phạm vi [0, num_classes) .

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

Multinomial (const :: tensorflow::Scope & scope, :: tensorflow::Input logits, :: tensorflow::Input num_samples)
Multinomial (const :: tensorflow::Scope & scope, :: tensorflow::Input logits, :: tensorflow::Input num_samples, const Multinomial::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

OutputDtype (DataType x)
Seed (int64 x)
Seed2 (int64 x)

Cấu trúc

tensorflow::ops::Multinomial::Attrs

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

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

Đa thức

 Multinomial(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input logits,
  ::tensorflow::Input num_samples
)

Đa thức

 Multinomial(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input logits,
  ::tensorflow::Input num_samples,
  const Multinomial::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

Loại đầu ra

Attrs OutputDtype(
  DataType x
)

Hạt giống

Attrs Seed(
  int64 x
)

Hạt giống2

Attrs Seed2(
  int64 x
)