جریان تنسور:: عملیات:: جمع آوری

#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:: 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
)