เทนเซอร์โฟลว์:: ปฏิบัติการ:: รวมตัว
#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) | |
โครงสร้าง | |
|---|---|
| เทนเซอร์โฟลว์ :: ops :: รวบรวม :: 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 )