tensorflow::ops::Gather

#include <array_ops.h>

รวบรวม ส่วนต่างๆ จาก params ตาม indices

สรุป

indices ต้องเป็นเทนเซอร์จำนวนเต็มที่มีมิติใดก็ได้ (โดยปกติจะเป็น 0 มิติหรือ 1 มิติ) จะสร้างเทนเซอร์เอาต์พุตที่มีรูปร่าง 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 

ตัวดำเนินการ::เทนเซอร์โฟลว์::อินพุต

 operator::tensorflow::Input() const 

ตัวดำเนินการ::เทนเซอร์โฟลว์::เอาต์พุต

 operator::tensorflow::Output() const 

ฟังก์ชันคงที่สาธารณะ

ตรวจสอบดัชนี

Attrs ValidateIndices(
  bool x
)