tensorflow::ops::HistogramFixedWidth

#include <math_ops.h>

Trả về biểu đồ tần suất của các giá trị.

Bản tóm tắt

Với values tensor đã cho, phép toán này trả về một biểu đồ tần suất hạng 1 đếm số lượng mục trong values nằm trong mỗi khoảng (bin). Các khoảng có chiều rộng bằng nhau và được xác định bởi các đối số value_range và nbins .

# Bins will be:  (-inf, 1), [1, 2), [2, 3), [3, 4), [4, inf)
nbins = 5
value_range = [0.0, 5.0]
new_values = [-1.0, 0.0, 1.5, 2.0, 5.0, 15]

with tf.get_default_session() as sess:
  hist = tf.histogram_fixed_width(new_values, value_range, nbins=5)
  variables.global_variables_initializer().run()
  sess.run(hist) => [2, 1, 1, 0, 2]

Luận điểm:

  • phạm vi: Một đối tượng Phạm vi
  • giá trị: Tensor số.
  • value_range: Hình dạng [2] Tensor có cùng dtype với values . values ​​<= value_range[0] sẽ được ánh xạ tới hist[0], values ​​>= value_range[1] sẽ được ánh xạ tới hist[-1].
  • nbins: Giá trị vô hướng int32 Tensor . Số lượng ô trong biểu đồ tần số.

Trả về:

  • Output : Một Tensor 1 chiều chứa biểu đồ tần suất các giá trị.

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

HistogramFixedWidth (const :: tensorflow::Scope & scope, :: tensorflow::Input values, :: tensorflow::Input value_range, :: tensorflow::Input nbins)
HistogramFixedWidth (const :: tensorflow::Scope & scope, :: tensorflow::Input values, :: tensorflow::Input value_range, :: tensorflow::Input nbins, const HistogramFixedWidth::Attrs & attrs)

Thuộc tính công khai

operation
out

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

Dtype (DataType x)

Cấu trúc

tensorflow::ops::HistogramFixedWidth::Attrs

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

Thuộc tính công khai

hoạt động

Operation operation

ngoài

::tensorflow::Output out

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

HistogramFixedWidth

 HistogramFixedWidth(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input values,
  ::tensorflow::Input value_range,
  ::tensorflow::Input nbins
)

HistogramFixedWidth

 HistogramFixedWidth(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input values,
  ::tensorflow::Input value_range,
  ::tensorflow::Input nbins,
  const HistogramFixedWidth::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 D

Attrs Dtype(
  DataType x
)