tensorflow:: אופס:: SoftmaxCrossEntropyWithLogits
#include <nn_ops.h>
מחשבת עלות אנטרופיה צולבת של Softmax ושיפועים כדי להתפשט לאחור.
תַקצִיר
תשומות הן הלוגיטים, לא ההסתברויות.
טיעונים:
- scope: אובייקט Scope
- תכונות: batch_size x num_classes מטריצה
- תוויות: batch_size x num_classes matrix המתקשר חייב לוודא שכל אצווה של תוויות מייצגת התפלגות הסתברות חוקית.
החזרות:
- אובדן
Output
: לכל אובדן לדוגמה (וקטור batch_size). -
Output
אחורי: שיפועים מופצים לאחור (גודל_אצווה x מטריצת num_classes).
בנאים והורסים | |
---|---|
SoftmaxCrossEntropyWithLogits (const :: tensorflow::Scope & scope, :: tensorflow::Input features, :: tensorflow::Input labels) |
תכונות ציבוריות | |
---|---|
backprop | |
loss | |
operation |
תכונות ציבוריות
משענת גב
::tensorflow::Output backprop
הֶפסֵד
::tensorflow::Output loss
מִבצָע
Operation operation
תפקידים ציבוריים
SoftmaxCrossEntropyWithLogits
SoftmaxCrossEntropyWithLogits( const ::tensorflow::Scope & scope, ::tensorflow::Input features, ::tensorflow::Input labels )
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 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```"]]