tensorflow:: ops:: SparseBincount

#include <math_ops.h>

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

ملخص

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

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

الحجج:

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

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

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

المرتجعات:

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

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

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

 operator::tensorflow::Input() const 

operator::tensorflow::Output

 operator::tensorflow::Output() const 

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

مخرج ثنائي

Attrs BinaryOutput(
  bool x
)