จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
เทนเซอร์โฟลว์:: ปฏิบัติการ:: ซอฟท์แม็กซ์
#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
คุณลักษณะสาธารณะ
งานสาธารณะ
โหนด
::tensorflow::Node * node() const
operator::tensorflow::Input() const
ตัวดำเนินการ::tensorflow::เอาต์พุต
operator::tensorflow::Output() const
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-07-26 UTC
[null,null,["อัปเดตล่าสุด 2025-07-26 UTC"],[],[],null,["# tensorflow::ops::Softmax Class Reference\n\ntensorflow::ops::Softmax\n========================\n\n`#include \u003cnn_ops.h\u003e`\n\nComputes softmax activations.\n\nSummary\n-------\n\nFor each batch `i` and class `j` we have \n\n```maxima\n$$softmax[i, j] = exp(logits[i, j]) / sum_j(exp(logits[i, j]))$$\n```\n\n\u003cbr /\u003e\n\nArguments:\n\n- scope: A [Scope](/versions/r2.0/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope) object\n- logits: 2-D with shape `[batch_size, num_classes]`.\n\n\u003cbr /\u003e\n\nReturns:\n\n- [Output](/versions/r2.0/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output): Same shape as `logits`.\n\n\u003cbr /\u003e\n\n| ### Constructors and Destructors ||\n|---|---|\n| [Softmax](#classtensorflow_1_1ops_1_1_softmax_1a565ed3a9b8adbafdb0a1b2061ce9cb08)`(const ::`[tensorflow::Scope](/versions/r2.0/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope)` & scope, ::`[tensorflow::Input](/versions/r2.0/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` logits)` ||\n\n| ### Public attributes ||\n|-------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------|\n| [operation](#classtensorflow_1_1ops_1_1_softmax_1ae62568a4488f40832dac845de04cff94) | [Operation](/versions/r2.0/api_docs/cc/class/tensorflow/operation#classtensorflow_1_1_operation) |\n| [softmax](#classtensorflow_1_1ops_1_1_softmax_1af8238048a2a280f84eee57c9c1919084) | `::`[tensorflow::Output](/versions/r2.0/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output) |\n\n| ### Public functions ||\n|-------------------------------------------------------------------------------------------------------------------|------------------------|\n| [node](#classtensorflow_1_1ops_1_1_softmax_1afda37c06f46dc3432931b9d9d88c5d2f)`() const ` | `::tensorflow::Node *` |\n| [operator::tensorflow::Input](#classtensorflow_1_1ops_1_1_softmax_1aa54bc0dd86d6e5de7ad24726ce6dd814)`() const ` | ` ` ` ` |\n| [operator::tensorflow::Output](#classtensorflow_1_1ops_1_1_softmax_1ae17f3a9a7db00b3a8a148668fe8b45d8)`() const ` | ` ` ` ` |\n\nPublic attributes\n-----------------\n\n### operation\n\n```text\nOperation operation\n``` \n\n### softmax\n\n```text\n::tensorflow::Output softmax\n``` \n\nPublic functions\n----------------\n\n### Softmax\n\n```gdscript\n Softmax(\n const ::tensorflow::Scope & scope,\n ::tensorflow::Input logits\n)\n``` \n\n### node\n\n```gdscript\n::tensorflow::Node * node() const \n``` \n\n### operator::tensorflow::Input\n\n```gdscript\n operator::tensorflow::Input() const \n``` \n\n### operator::tensorflow::Output\n\n```gdscript\n operator::tensorflow::Output() const \n```"]]