Koleksiyonlar ile düzeninizi koruyun
İçeriği tercihlerinize göre kaydedin ve kategorilere ayırın.
tensor akışı:: işlem:: SeyrekAddGrad
#include <sparse_ops.h>
SparseAdd işlemi için gradyan operatörü.
Özet
SparseAdd op, A + B'yi hesaplar; burada A, B ve toplam, SparseTensor
nesneleri olarak temsil edilir. Bu işlem, toplamın boş olmayan değerlerine göre yukarı akış degradesini alır ve A ve B'nin boş olmayan değerlerine göre degradelerin çıktısını alır.
Argümanlar:
- kapsam: Bir Kapsam nesnesi
- backprop_val_grad:
[nnz(sum)]
şeklinde 1 boyutlu. Toplamın boş olmayan değerlerine göre gradyan. - a_endeksler: 2-D.
SparseTensor
A'nın indices
, size [nnz(A), ndims]
. - b_endeksleri: 2-D.
SparseTensor
B'nin indices
, size [nnz(B), ndims]
. - toplam_endeksler: 2-B. Toplamın
indices
SparseTensor
, size [nnz(sum), ndims]
.
İade:
-
Output
a_val_grad: şekilli 1-D [nnz(A)]
. A'nın boş olmayan değerlerine göre gradyan. -
Output
b_val_grad: [nnz(B)]
şeklinde 1-D. B'nin boş olmayan değerlerine göre gradyan.
Genel özellikler
Kamu işlevleri
Aksi belirtilmediği sürece bu sayfanın içeriği Creative Commons Atıf 4.0 Lisansı altında ve kod örnekleri Apache 2.0 Lisansı altında lisanslanmıştır. Ayrıntılı bilgi için Google Developers Site Politikaları'na göz atın. Java, Oracle ve/veya satış ortaklarının tescilli ticari markasıdır.
Son güncelleme tarihi: 2025-07-26 UTC.
[null,null,["Son güncelleme tarihi: 2025-07-26 UTC."],[],[],null,["# tensorflow::ops::SparseAddGrad Class Reference\n\ntensorflow::ops::SparseAddGrad\n==============================\n\n`#include \u003csparse_ops.h\u003e`\n\nThe gradient operator for the [SparseAdd](/versions/r2.1/api_docs/cc/class/tensorflow/ops/sparse-add#classtensorflow_1_1ops_1_1_sparse_add) op.\n\nSummary\n-------\n\nThe [SparseAdd](/versions/r2.1/api_docs/cc/class/tensorflow/ops/sparse-add#classtensorflow_1_1ops_1_1_sparse_add) op calculates A + B, where A, B, and the sum are all represented as `SparseTensor` objects. This op takes in the upstream gradient w.r.t. non-empty values of the sum, and outputs the gradients w.r.t. the non-empty values of A and B.\n\nArguments:\n\n- scope: A [Scope](/versions/r2.1/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope) object\n- backprop_val_grad: 1-D with shape `[nnz(sum)]`. The gradient with respect to the non-empty values of the sum.\n- a_indices: 2-D. The `indices` of the `SparseTensor` A, size `[nnz(A), ndims]`.\n- b_indices: 2-D. The `indices` of the `SparseTensor` B, size `[nnz(B), ndims]`.\n- sum_indices: 2-D. The `indices` of the sum `SparseTensor`, size `[nnz(sum), ndims]`.\n\n\u003cbr /\u003e\n\nReturns:\n\n- [Output](/versions/r2.1/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output) a_val_grad: 1-D with shape `[nnz(A)]`. The gradient with respect to the non-empty values of A.\n- [Output](/versions/r2.1/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output) b_val_grad: 1-D with shape `[nnz(B)]`. The gradient with respect to the non-empty values of B.\n\n\u003cbr /\u003e\n\n| ### Constructors and Destructors ||\n|---|---|\n| [SparseAddGrad](#classtensorflow_1_1ops_1_1_sparse_add_grad_1abbcde91fb7e908ec0479c7f47b13e1c5)`(const ::`[tensorflow::Scope](/versions/r2.1/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope)` & scope, ::`[tensorflow::Input](/versions/r2.1/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` backprop_val_grad, ::`[tensorflow::Input](/versions/r2.1/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` a_indices, ::`[tensorflow::Input](/versions/r2.1/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` b_indices, ::`[tensorflow::Input](/versions/r2.1/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` sum_indices)` ||\n\n| ### Public attributes ||\n|----------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------|\n| [a_val_grad](#classtensorflow_1_1ops_1_1_sparse_add_grad_1a93a1ecb35e9a570a0ce07d6b64c378d3) | `::`[tensorflow::Output](/versions/r2.1/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output) |\n| [b_val_grad](#classtensorflow_1_1ops_1_1_sparse_add_grad_1a89ccb278507678ca1a3ac465ccdf2613) | `::`[tensorflow::Output](/versions/r2.1/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output) |\n| [operation](#classtensorflow_1_1ops_1_1_sparse_add_grad_1a0ae3fb6459f86ab238ee9d3705c33994) | [Operation](/versions/r2.1/api_docs/cc/class/tensorflow/operation#classtensorflow_1_1_operation) |\n\nPublic attributes\n-----------------\n\n### a_val_grad\n\n```scdoc\n::tensorflow::Output a_val_grad\n``` \n\n### b_val_grad\n\n```scdoc\n::tensorflow::Output b_val_grad\n``` \n\n### operation\n\n```text\nOperation operation\n``` \n\nPublic functions\n----------------\n\n### SparseAddGrad\n\n```gdscript\n SparseAddGrad(\n const ::tensorflow::Scope & scope,\n ::tensorflow::Input backprop_val_grad,\n ::tensorflow::Input a_indices,\n ::tensorflow::Input b_indices,\n ::tensorflow::Input sum_indices\n)\n```"]]