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. - الأوزان: عبارة عن
Tensorint32 أو 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 )
إنّ محتوى هذه الصفحة مرخّص بموجب ترخيص Creative Commons Attribution 4.0 ما لم يُنصّ على خلاف ذلك، ونماذج الرموز مرخّصة بموجب ترخيص Apache 2.0. للاطّلاع على التفاصيل، يُرجى مراجعة سياسات موقع Google Developers. إنّ Java هي علامة تجارية مسجَّلة لشركة Oracle و/أو شركائها التابعين.
تاريخ التعديل الأخير: 2026-11-05 (حسب التوقيت العالمي المتفَّق عليه)