tensorflow:: عملیات:: جمع‌آوری

#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 اختصاص داده شود، شاخص‌های خارج از محدوده منجر به رفتار ایمن اما نامشخص می‌شوند که ممکن است شامل ایجاد خطا باشد.

استدلال‌ها:

بازده:

  • 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:: عملیات:: گرد هم آوردن:: جذابیت‌ها

تنظیم‌کننده‌های ویژگی اختیاری برای 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
)