تدفق التوتر:: العمليات:: DenseBincount

#include <math_ops.h>

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

ملخص

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

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

الحجج:

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

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

  • إخراج ثنائي: منطقي؛ ما إذا كان يجب على النواة حساب المظهر أو عدد مرات الظهور.

عائدات:

  • Output : Tensor 1D بطول يساوي size أو Tensor ثنائي الأبعاد مع [batch_size, 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

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

DenseBincount

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

العقدة

::tensorflow::Node * node() const 

المشغل::tensorflow::الإدخال

 operator::tensorflow::Input() const 

المشغل::tensorflow::الإخراج

 operator::tensorflow::Output() const 

وظائف ثابتة العامة

BinaryOutput

Attrs BinaryOutput(
  bool x
)