تينسورفلو :: العمليات :: جمع
#include <array_ops.h>
اجمع الشرائح من محور axis
params
وفقًا indices
.
ملخص
يجب أن تكون indices
عددًا صحيحًا موترًا لأي بُعد (عادةً 0-D أو 1-D). ينتج موتر إخراج باستخدام params.shape[:axis] + indices.shape + params.shape[axis + 1:]
الشكل params.shape[:axis] + indices.shape + params.shape[axis + 1:]
حيث:
# Scalar indices (output is rank(params) - 1). output[a_0, ..., a_n, b_0, ..., b_n] = params[a_0, ..., a_n, indices, b_0, ..., b_n]
# Vector indices (output is rank(params)). output[a_0, ..., a_n, i, b_0, ..., b_n] = params[a_0, ..., a_n, indices[i], b_0, ..., b_n]
# Higher rank indices (output is rank(params) + rank(indices) - 1). output[a_0, ..., a_n, i, ..., j, b_0, ... b_n] = params[a_0, ..., a_n, indices[i, ..., j], b_0, ..., b_n]
لاحظ أنه في وحدة المعالجة المركزية ، إذا تم العثور على فهرس خارج النطاق ، يتم إرجاع خطأ. في وحدة معالجة الرسومات ، إذا تم العثور على فهرس خارج النطاق ، يتم تخزين 0 في قيمة الإخراج المقابلة.
راجع أيضًا tf.batch_gather
و tf.gather_nd
.
الحجج:
- النطاق: كائن النطاق
- المعلمات: الموتر الذي يتم من خلاله جمع القيم. يجب أن يكون
axis + 1
الترتيب على الأقلaxis + 1
. - المؤشرات: مؤشر موتر. يجب أن يكون في النطاق
[0, params.shape[axis])
. - المحور: المحور في
params
المراد تجميعindices
منه. افتراضات إلى البعد الأول. يدعم الفهارس السلبية.
عائدات:
-
Output
: القيم منparams
تم جمعها من الفهارس ، معparams.shape[:axis] + indices.shape + params.shape[axis + 1:]
الشكلparams.shape[:axis] + indices.shape + params.shape[axis + 1:]
indices
. شكلparams.shape[:axis] + indices.shape + params.shape[axis + 1:]
.
البنائين والمدمرين | |
---|---|
GatherV2 (const :: tensorflow::Scope & scope, :: tensorflow::Input params, :: tensorflow::Input indices, :: tensorflow::Input axis) | |
GatherV2 (const :: tensorflow::Scope & scope, :: tensorflow::Input params, :: tensorflow::Input indices, :: tensorflow::Input axis, const GatherV2::Attrs & attrs) |
السمات العامة | |
---|---|
operation | |
output |
الوظائف العامة | |
---|---|
node () const | ::tensorflow::Node * |
operator::tensorflow::Input () const | |
operator::tensorflow::Output () const |
وظائف ثابتة عامة | |
---|---|
BatchDims (int64 x) |
الهياكل | |
---|---|
tensorflow :: العمليات :: GatherV2 :: Attrs |
السمات العامة
عملية
Operation operation
انتاج
::tensorflow::Output output
الوظائف العامة
جمع
GatherV2( const ::tensorflow::Scope & scope, ::tensorflow::Input params, ::tensorflow::Input indices, ::tensorflow::Input axis )
جمع
GatherV2( const ::tensorflow::Scope & scope, ::tensorflow::Input params, ::tensorflow::Input indices, ::tensorflow::Input axis, const GatherV2::Attrs & attrs )
العقدة
::tensorflow::Node * node() const
المشغل :: tensorflow :: الإدخال
operator::tensorflow::Input() const
المشغل :: Tensorflow :: Output
operator::tensorflow::Output() const
وظائف ثابتة عامة
دفعات
Attrs BatchDims( int64 x )
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.