dòng chảy :: hoạt động :: HistogramFixedWidth

#include <math_ops.h>

Trả về biểu đồ giá trị.

Tóm lược

Với các values tensor, phép toán này trả về biểu đồ xếp hạng 1 đếm số mục nhập trong values nằm trong mỗi thùng. Các thùng có chiều rộng bằng nhau và được xác định bởi các đối số value_rangenbins .

# 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]

Tranh luận:

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

Lợi nhuận:

Người xây dựng và Người phá 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 cộng

operation
out

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

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

Các chức năng tĩnh công khai

Dtype (DataType x)

Cấu trúc

tensorflow :: ops :: HistogramFixedWidth :: Attrs

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

Thuộc tính công cộng

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 

toán tử :: tensorflow :: Đầu vào

 operator::tensorflow::Input() const 

toán tử :: tensorflow :: Đầu ra

 operator::tensorflow::Output() const 

Các chức năng tĩnh công khai

Dtype

Attrs Dtype(
  DataType x
)