จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
เทนเซอร์โฟลว์:: ปฏิบัติการ:: SoftmaxCrossEntropyWithLogits
#include <nn_ops.h>
คำนวณต้นทุนเอนโทรปีข้าม softmax และการไล่ระดับสีเพื่อเผยแพร่กลับ
สรุป
อินพุตคือบันทึก ไม่ใช่ความน่าจะเป็น
ข้อโต้แย้ง:
- ขอบเขต: วัตถุ ขอบเขต
- คุณสมบัติ: เมทริกซ์ชุดขนาด x num_classes
- ป้ายกำกับ: เมทริกซ์ขนาดชุด x num_classes ผู้เรียกต้องแน่ใจว่าป้ายกำกับแต่ละชุดแสดงถึงการแจกแจงความน่าจะเป็นที่ถูกต้อง
ผลตอบแทน:
- การสูญเสีย
Output
: ตามตัวอย่างการสูญเสีย (เวกเตอร์ขนาดแบทช์) - backprop
Output
: การไล่ระดับสีแบบแบ็คโพรเพน (batch_size x num_classes matrix)
คุณลักษณะสาธารณะ
งานสาธารณะ
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-07-25 UTC
[null,null,["อัปเดตล่าสุด 2025-07-25 UTC"],[],[],null,["# tensorflow::ops::SoftmaxCrossEntropyWithLogits Class Reference\n\ntensorflow::ops::SoftmaxCrossEntropyWithLogits\n==============================================\n\n`#include \u003cnn_ops.h\u003e`\n\nComputes softmax cross entropy cost and gradients to backpropagate.\n\nSummary\n-------\n\nInputs are the logits, not probabilities.\n\nArguments:\n\n- scope: A [Scope](/versions/r1.15/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope) object\n- features: batch_size x num_classes matrix\n- labels: batch_size x num_classes matrix The caller must ensure that each batch of labels represents a valid probability distribution.\n\n\u003cbr /\u003e\n\nReturns:\n\n- [Output](/versions/r1.15/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output) loss: Per example loss (batch_size vector).\n- [Output](/versions/r1.15/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output) backprop: backpropagated gradients (batch_size x num_classes matrix).\n\n\u003cbr /\u003e\n\n| ### Constructors and Destructors ||\n|---|---|\n| [SoftmaxCrossEntropyWithLogits](#classtensorflow_1_1ops_1_1_softmax_cross_entropy_with_logits_1a4cbff4fa9d4606e374b1a88b5de132dc)`(const ::`[tensorflow::Scope](/versions/r1.15/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope)` & scope, ::`[tensorflow::Input](/versions/r1.15/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` features, ::`[tensorflow::Input](/versions/r1.15/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` labels)` ||\n\n| ### Public attributes ||\n|---------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------|\n| [backprop](#classtensorflow_1_1ops_1_1_softmax_cross_entropy_with_logits_1a3f3e88d3a28b38d7190c586e53a90391) | `::`[tensorflow::Output](/versions/r1.15/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output) |\n| [loss](#classtensorflow_1_1ops_1_1_softmax_cross_entropy_with_logits_1ad3f6fea2fc731063932763fa4b3c8ce0) | `::`[tensorflow::Output](/versions/r1.15/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output) |\n| [operation](#classtensorflow_1_1ops_1_1_softmax_cross_entropy_with_logits_1aec7fdf4d82369e8bc00d0c9c8dd7faab) | [Operation](/versions/r1.15/api_docs/cc/class/tensorflow/operation#classtensorflow_1_1_operation) |\n\nPublic attributes\n-----------------\n\n### backprop\n\n```text\n::tensorflow::Output backprop\n``` \n\n### loss\n\n```text\n::tensorflow::Output loss\n``` \n\n### operation\n\n```text\nOperation operation\n``` \n\nPublic functions\n----------------\n\n### SoftmaxCrossEntropyWithLogits\n\n```gdscript\n SoftmaxCrossEntropyWithLogits(\n const ::tensorflow::Scope & scope,\n ::tensorflow::Input features,\n ::tensorflow::Input labels\n)\n```"]]