เทนเซอร์โฟลว์:: ปฏิบัติการ:: ซอฟท์แม็กซ์

#include <nn_ops.h>

คำนวณการเปิดใช้งาน softmax

สรุป

สำหรับแต่ละแบตช์ i และคลาส j เรามี

$$softmax[i, j] = exp(logits[i, j]) / sum_j(exp(logits[i, j]))$$

ข้อโต้แย้ง:

  • ขอบเขต: วัตถุ ขอบเขต
  • logits: 2-D ที่มีรูปร่าง [batch_size, num_classes]

ผลตอบแทน:

  • Output : รูปร่างเดียวกับ logits

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

Softmax (const :: tensorflow::Scope & scope, :: tensorflow::Input logits)

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

operation
softmax

งานสาธารณะ

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

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

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

Operation operation

ซอฟท์แม็กซ์

::tensorflow::Output softmax

งานสาธารณะ

ซอฟท์แม็กซ์

 Softmax(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input logits
)

โหนด

::tensorflow::Node * node() const 

ตัวดำเนินการ::tensorflow::อินพุต

 operator::tensorflow::Input() const 

ตัวดำเนินการ::tensorflow::เอาต์พุต

 operator::tensorflow::Output() const