تينسورفلو :: العمليات :: متفرقة
#include <sparse_ops.h>
يطبق softmax على ND SparseTensor
المجمعة.
ملخص
تمثل المدخلات ND SparseTensor ذو الشكل المنطقي [..., B, C]
(حيث N >= 2
) ، ومع الفهارس مرتبة بترتيب المعجم المتعارف عليه.
هذا المرجع يعادل تطبيق tf.nn.softmax()
العادي على كل مصفوفة فرعية منطقية داخلية ذات الشكل [B, C]
، ولكن مع المصيد الذي لا تشارك فيه العناصر الصفرية ضمنيًا . على وجه التحديد ، الخوارزمية تعادل ما يلي:
(1) يطبق tf.nn.softmax()
على عرض مكثف لكل مصفوفة فرعية داخلية ذات الشكل [B, C]
، على طول بُعد الحجم C ؛ (2) يقنع المواقع الأصلية ضمنيًا صفر ؛ (3) يعيد تطبيع العناصر المتبقية.
وبالتالي ، فإن نتيجة SparseTensor
لها نفس المؤشرات والشكل غير الصفري.
الحجج:
- النطاق: كائن النطاق
- sp_indices: 2-د. مصفوفة
NNZ x R
مع مؤشرات القيم غير الفارغة في SparseTensor ، بترتيب أساسي. - sp_values: 1-د.
NNZ
غير الفارغة المقابلة لـsp_indices
. - sp_ الشكل: 1-د. شكل الإدخال SparseTensor.
عائدات:
-
Output
: 1-D. وNNZ
القيم لنتيجةSparseTensor
.
البنائين والمدمرين | |
---|---|
SparseSoftmax (const :: tensorflow::Scope & scope, :: tensorflow::Input sp_indices, :: tensorflow::Input sp_values, :: tensorflow::Input sp_shape) |
السمات العامة | |
---|---|
operation | |
output |
الوظائف العامة | |
---|---|
node () const | ::tensorflow::Node * |
operator::tensorflow::Input () const | |
operator::tensorflow::Output () const |
السمات العامة
عملية
Operation operation
انتاج
::tensorflow::Output output
الوظائف العامة
متفرقة
SparseSoftmax( const ::tensorflow::Scope & scope, ::tensorflow::Input sp_indices, ::tensorflow::Input sp_values, ::tensorflow::Input sp_shape )
العقدة
::tensorflow::Node * node() const
المشغل :: tensorflow :: الإدخال
operator::tensorflow::Input() const
المشغل :: Tensorflow :: Output
operator::tensorflow::Output() const
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2020-04-20 UTC.