tensorflow::ops::SparseBincount

#include <math_ops.h>

Counts the number of occurrences of each value in an integer array.

สรุป

ฟังก์ชันนี้จะส่งออกเวกเตอร์ที่มีความยาว size และมีชนิดข้อมูล (dtype) เดียวกันกับ weights ถ้า weights ว่างเปล่า ดัชนี i จะเก็บจำนวนครั้งที่ค่า i ปรากฏใน arr ถ้า weights ไม่ว่างเปล่า ดัชนี i จะเก็บผลรวมของค่าใน weights ที่แต่ละดัชนีซึ่งค่าที่สอดคล้องกันใน arr คือ i

Values in arr outside of the range [0, size) are ignored.

ข้อโต้แย้ง:

  • ขอบเขต: วัตถุ ขอบเขต
  • ดัชนี: Tensor int64 2 มิติ
  • ค่า: Tensor จำนวนเต็ม 1 มิติ
  • dense_shape: Tensor int64 1 มิติ
  • ขนาด: จำนวนเต็มที่ไม่ติดลบ สเกลาร์ Tensor
  • weights: is an int32, int64, float32, or float64 Tensor with the same shape as input , or a length-0 Tensor , in which case it acts as all weights equal to 1.

คุณลักษณะเสริม (ดูที่ Attrs ):

  • binary_output: bool; Whether the kernel should count the appearance or number of occurrences.

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

  • Output : 1D Tensor with length equal to size or 2D Tensor with [batch_size, size ]. The counts or summed weights for each value in the range [0, size).

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

SparseBincount (const :: tensorflow::Scope & scope, :: tensorflow::Input indices, :: tensorflow::Input values, :: tensorflow::Input dense_shape, :: tensorflow::Input size, :: tensorflow::Input weights)
SparseBincount (const :: tensorflow::Scope & scope, :: tensorflow::Input indices, :: tensorflow::Input values, :: tensorflow::Input dense_shape, :: tensorflow::Input size, :: tensorflow::Input weights, const SparseBincount::Attrs & attrs)

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

operation
output

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

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

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

BinaryOutput (bool x)

โครงสร้าง

tensorflow::ops::SparseBincount::Attrs

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

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

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

Operation operation

เอาต์พุต

::tensorflow::Output output

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

จำนวนถังที่เบาบาง

 SparseBincount(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input indices,
  ::tensorflow::Input values,
  ::tensorflow::Input dense_shape,
  ::tensorflow::Input size,
  ::tensorflow::Input weights
)

จำนวนถังที่เบาบาง

 SparseBincount(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input indices,
  ::tensorflow::Input values,
  ::tensorflow::Input dense_shape,
  ::tensorflow::Input size,
  ::tensorflow::Input weights,
  const SparseBincount::Attrs & attrs
)

โหนด

::tensorflow::Node * node() const 

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

 operator::tensorflow::Input() const 

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

 operator::tensorflow::Output() const 

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

เอาต์พุตไบนารี

Attrs BinaryOutput(
  bool x
)