tensorflow::ops::AccumulatorTakeGradient

#include <data_flow_ops.h>

ดึงค่าความชันเฉลี่ยใน ConditionalAccumulator ที่กำหนดให้

สรุป

ฟังก์ชันนี้จะบล็อกการทำงานจนกว่าจะสะสมค่าความชันได้เพียงพอ (เช่น มากกว่า num_required) หากตัวสะสมได้รวบรวมค่าความชันมากกว่า num_required แล้ว ฟังก์ชันจะส่งคืนค่าความชันเฉลี่ยที่สะสมไว้ นอกจากนี้ยังเพิ่มค่า global_step ที่บันทึกไว้ในตัวสะสมขึ้น 1 โดยอัตโนมัติ และรีเซ็ตค่ารวมเป็น 0

ข้อโต้แย้ง:

  • ขอบเขต: วัตถุ ขอบเขต
  • ด้ามจับ: ด้ามจับของตัวสะสมพลังงาน
  • num_required: จำนวนเกรเดียนต์ที่จำเป็นก่อนที่เราจะส่งคืนค่ารวม
  • dtype: ชนิดข้อมูลของค่าความชันสะสม ต้องตรงกับชนิดของตัวสะสม

การส่งคืนสินค้า:

  • Output : ค่าเฉลี่ยของค่าความชันที่สะสมไว้

ตัวสร้างและตัวทำลาย

AccumulatorTakeGradient (const :: tensorflow::Scope & scope, :: tensorflow::Input handle, :: tensorflow::Input num_required, DataType dtype)

คุณลักษณะสาธารณะ

average
operation

หน้าที่สาธารณะ

node () const
::tensorflow::Node *
operator::tensorflow::Input () const
operator::tensorflow::Output () const

คุณลักษณะสาธารณะ

เฉลี่ย

::tensorflow::Output average

การดำเนินการ

Operation operation

หน้าที่สาธารณะ

ตัวสะสมคำนวณเกรด

 AccumulatorTakeGradient(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input handle,
  ::tensorflow::Input num_required,
  DataType dtype
)

โหนด

::tensorflow::Node * node() const 

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

 operator::tensorflow::Input() const 

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

 operator::tensorflow::Output() const