تدفق التوتر:: العمليات:: SparseBincount
#include <math_ops.h>حساب عدد مرات ظهور كل قيمة في مصفوفة أعداد صحيحة.
ملخص
 يُخرج متجهًا size الطول ونفس نوع d مثل weights . إذا كانت weights فارغة، فسيقوم الفهرس i بتخزين عدد المرات التي تم فيها حساب القيمة i في arr . إذا كانت weights غير فارغة، فإن الفهرس i يخزن مجموع القيمة weights في كل فهرس حيث تكون القيمة المقابلة في arr هي i .
 يتم تجاهل القيم arr خارج النطاق [0، الحجم).
الحجج:
- النطاق: كائن النطاق
-  المؤشرات: 2D int64 Tensor.
-  القيم: 1D int Tensor.
-  كثيف_الشكل: 1D int64 Tensor.
-  الحجم: Tensorعددي غير سالب.
-  الأوزان: عبارة عن Tensorint32 أو int64 أو float32 أو float64 له نفس شكلinputأوTensorlength-0، وفي هذه الحالة يكون بمثابة جميع الأوزان تساوي 1.
 السمات الاختيارية (انظر Attrs ):
- إخراج ثنائي: منطقي؛ ما إذا كان يجب على النواة حساب المظهر أو عدد مرات الظهور.
العوائد:
-  Output:Tensor1D بطول يساويsizeأوTensorثنائي الأبعاد مع [batch_size,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
SparseBincount( const ::tensorflow::Scope & scope, ::tensorflow::Input indices, ::tensorflow::Input values, ::tensorflow::Input dense_shape, ::tensorflow::Input size, ::tensorflow::Input weights )
SparseBincount
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
المشغل::tensorflow::الإدخال
operator::tensorflow::Input() const
المشغل::tensorflow::الإخراج
operator::tensorflow::Output() const
وظائف ثابتة العامة
BinaryOutput
Attrs BinaryOutput( bool x )
إنّ محتوى هذه الصفحة مرخّص بموجب ترخيص Creative Commons Attribution 4.0 ما لم يُنصّ على خلاف ذلك، ونماذج الرموز مرخّصة بموجب ترخيص Apache 2.0. للاطّلاع على التفاصيل، يُرجى مراجعة سياسات موقع Google Developers. إنّ Java هي علامة تجارية مسجَّلة لشركة Oracle و/أو شركائها التابعين.
تاريخ التعديل الأخير: 2025-07-26 (حسب التوقيت العالمي المتفَّق عليه)