tensorflow::ops::HistogramFixedWidth

#include <math_ops.h>

ส่งคืนฮิสโตแกรมของค่าต่างๆ

สรุป

เมื่อกำหนด values เทนเซอร์แล้ว การดำเนินการนี้จะส่งคืนฮิสโตแกรมลำดับที่ 1 ซึ่งนับจำนวนรายการใน values ที่ตกอยู่ในแต่ละบิน โดยบินจะมีขนาดความกว้างเท่ากันและกำหนดโดยอาร์กิวเมนต์ value_range และ 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]

ข้อโต้แย้ง:

  • ขอบเขต: วัตถุ ขอบเขต
  • ค่า: Tensor เชิงตัวเลข
  • value_range: รูปร่าง [2] Tensor ที่มี dtype เดียวกันกับ values values ​​<= value_range[0] จะถูกแมปไปยัง hist[0] ค่า >= value_range[1] จะถูกแมปไปยัง hist[-1]
  • nbins: int32 Tensor แบบสเกลาร์ จำนวนช่องในฮิสโตแกรม

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

  • Output : Tensor 1 มิติ ที่เก็บฮิสโตแกรมของค่าต่างๆ

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

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)

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

operation
out

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

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

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

Dtype (DataType x)

โครงสร้าง

tensorflow::ops::HistogramFixedWidth::Attrs

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

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

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

Operation operation

ออก

::tensorflow::Output out

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

ฮิสโตแกรมความกว้างคงที่

 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
)

โหนด

::tensorflow::Node * node() const 

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

 operator::tensorflow::Input() const 

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

 operator::tensorflow::Output() const 

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

ประเภท D

Attrs Dtype(
  DataType x
)