tensorflow:: ops:: DenseBincount

#include <math_ops.h>

يحسب عدد مرات ظهور كل قيمة في مصفوفة الأعداد الصحيحة.

ملخص

يُخرج متجهًا بطول size وبنفس نوع بيانات weights . إذا كانت weights فارغة، فإن الفهرس i يُخزّن عدد مرات تكرار القيمة i في arr . أما إذا كانت weights غير فارغة، فإن الفهرس i يُخزّن مجموع القيم في weights عند كل فهرس حيث تكون القيمة المقابلة في arr هي i .

يتم تجاهل القيم الموجودة في arr خارج النطاق [0، الحجم).

الحجج:

  • النطاق: كائن النطاق
  • المدخلات: Tensor عددي أحادي أو ثنائي الأبعاد.
  • الحجم: عدد صحيح غير سالب، Tensor .
  • الأوزان: عبارة عن Tensor int32 أو int64 أو float32 أو float64 بنفس شكل arr ، أو Tensor طوله 0، وفي هذه الحالة يعمل على أنه جميع الأوزان تساوي 1.

السمات الاختيارية (انظر Attrs ):

  • binary_output: bool; ما إذا كان يجب على النواة حساب الظهور أو عدد مرات الحدوث.

المرتجعات:

  • Output : Tensor أحادي البعد بطول يساوي size أو Tensor ثنائي البعد بطول [حجم_الدفعة، size ]. عدد مرات ظهور كل قيمة في النطاق [0، الحجم] أو مجموع الأوزان.

البناة والمدمرون

DenseBincount (const :: tensorflow::Scope & scope, :: tensorflow::Input input, :: tensorflow::Input size, :: tensorflow::Input weights)
DenseBincount (const :: tensorflow::Scope & scope, :: tensorflow::Input input, :: tensorflow::Input size, :: tensorflow::Input weights, const DenseBincount::Attrs & attrs)

السمات العامة

operation
output

الوظائف العامة

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

الدوال الثابتة العامة

BinaryOutput (bool x)

الهياكل

tensorflow:: ops:: DenseBincount:: Attrs

مُعدِّلات السمات الاختيارية لـ DenseBincount .

السمات العامة

عملية

Operation operation

المخرجات

::tensorflow::Output output

الوظائف العامة

عدد الخانات الكثيفة

 DenseBincount(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input input,
  ::tensorflow::Input size,
  ::tensorflow::Input weights
)

عدد الخانات الكثيفة

 DenseBincount(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input input,
  ::tensorflow::Input size,
  ::tensorflow::Input weights,
  const DenseBincount::Attrs & attrs
)

العقدة

::tensorflow::Node * node() const 

operator::tensorflow::Input

 operator::tensorflow::Input() const 

operator::tensorflow::Output

 operator::tensorflow::Output() const 

الدوال الثابتة العامة

مخرج ثنائي

Attrs BinaryOutput(
  bool x
)