جریان تنسور:: عملیات:: جمع آوری
#include <array_ops.h>
برش ها را از params
بر اساس indices
ها جمع آوری کنید.
خلاصه
indices
ها باید یک تانسور صحیح از هر بعد (معمولاً 0-D یا 1-D) باشند. یک تانسور خروجی با شاخصهای شکل indices.shape + params.shape[1:]
تولید میکند که در آن:
# Scalar indices output[:, ..., :] = params[indices, :, ... :]
# Vector indices output[i, :, ..., :] = params[indices[i], :, ... :]
# Higher rank indices output[i, ..., j, :, ... :] = params[indices[i, ..., j], :, ..., :]
اگر indices
ها یک جایگشت و len(indices) == params.shape[0]
باشد، این عملیات بر این اساس params
را جابجا می کند.
validate_indices
: منسوخ شده است. اگر این عملیات به CPU اختصاص داده شود، مقادیر در indices
ها همیشه در محدوده اعتبارسنجی می شوند. اگر به GPU اختصاص داده شود، شاخص های خارج از محدوده منجر به رفتار ایمن اما نامشخص می شود که ممکن است شامل ایجاد یک خطا باشد.
استدلال ها:
- scope: یک شی Scope
برمی گرداند:
-
Output
: تانسور خروجی.
سازندگان و ویرانگرها | |
---|---|
Gather (const :: tensorflow::Scope & scope, :: tensorflow::Input params, :: tensorflow::Input indices) | |
Gather (const :: tensorflow::Scope & scope, :: tensorflow::Input params, :: tensorflow::Input indices, const Gather::Attrs & attrs) |
صفات عمومی | |
---|---|
operation | |
output |
توابع عمومی | |
---|---|
node () const | ::tensorflow::Node * |
operator::tensorflow::Input () const | |
operator::tensorflow::Output () const |
توابع استاتیک عمومی | |
---|---|
ValidateIndices (bool x) |
سازه ها | |
---|---|
tensorflow:: ops:: Gather:: Attrs | تنظیم کننده های ویژگی اختیاری برای Gather . |
صفات عمومی
عمل
Operation operation
خروجی
::tensorflow::Output output
توابع عمومی
جمع آوری
Gather( const ::tensorflow::Scope & scope, ::tensorflow::Input params, ::tensorflow::Input indices )
جمع آوری
Gather( const ::tensorflow::Scope & scope, ::tensorflow::Input params, ::tensorflow::Input indices, const Gather::Attrs & attrs )
گره
::tensorflow::Node * node() const
عملگر::tensorflow::ورودی
operator::tensorflow::Input() const
عملگر::tensorflow::خروجی
operator::tensorflow::Output() const
توابع استاتیک عمومی
اعتبارسنجی شاخص ها
Attrs ValidateIndices( bool x )
جز در مواردی که غیر از این ذکر شده باشد،محتوای این صفحه تحت مجوز Creative Commons Attribution 4.0 License است. نمونه کدها نیز دارای مجوز Apache 2.0 License است. برای اطلاع از جزئیات، به خطمشیهای سایت Google Developers مراجعه کنید. جاوا علامت تجاری ثبتشده Oracle و/یا شرکتهای وابسته به آن است.
تاریخ آخرین بهروزرسانی 2022-11-01 بهوقت ساعت هماهنگ جهانی.