# tensorflow::ops::SparseAccumulatorApplyGradient

`#include <data_flow_ops.h>`

Applies a sparse gradient to a given accumulator.

## Summary

Does not add if local_step is smaller than the accumulator's global_step.

Arguments:

- scope: A [Scope](https://www.tensorflow.org/versions/r2.0/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope) object
- handle: The handle to a accumulator.
- local_step: The local_step value at which the sparse gradient was computed.
- gradient_indices: Indices of the sparse gradient to be accumulated. Must be a vector.
- gradient_values: Values are the non-zero slices of the gradient, and must have the same first dimension as indices, i.e., the nnz represented by indices and values must be consistent.
- gradient_shape: Shape of the sparse gradient to be accumulated.
- has_known_shape: Boolean indicating whether gradient_shape is unknown, in which case the input is ignored during validation.

<br />

Returns:

- the created `https://www.tensorflow.org/versions/r2.0/api_docs/cc/class/tensorflow/operation#classtensorflow_1_1_operation`

<br />

| ### Constructors and Destructors ||
|---|---|
| `https://www.tensorflow.org/versions/r2.0/api_docs/cc/class/tensorflow/ops/sparse-accumulator-apply-gradient#classtensorflow_1_1ops_1_1_sparse_accumulator_apply_gradient_1aea8779790821fa94116859fd1dd3b604(const ::https://www.tensorflow.org/versions/r2.0/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope & scope, ::https://www.tensorflow.org/versions/r2.0/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input handle, ::https://www.tensorflow.org/versions/r2.0/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input local_step, ::https://www.tensorflow.org/versions/r2.0/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input gradient_indices, ::https://www.tensorflow.org/versions/r2.0/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input gradient_values, ::https://www.tensorflow.org/versions/r2.0/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input gradient_shape, bool has_known_shape)` ||

| ### Public attributes ||
|---|---|
| `https://www.tensorflow.org/versions/r2.0/api_docs/cc/class/tensorflow/ops/sparse-accumulator-apply-gradient#classtensorflow_1_1ops_1_1_sparse_accumulator_apply_gradient_1ae497952e7990fb56ce68d8add07c12c7` | `https://www.tensorflow.org/versions/r2.0/api_docs/cc/class/tensorflow/operation#classtensorflow_1_1_operation` |

| ### Public functions ||
|---|---|
| `https://www.tensorflow.org/versions/r2.0/api_docs/cc/class/tensorflow/ops/sparse-accumulator-apply-gradient#classtensorflow_1_1ops_1_1_sparse_accumulator_apply_gradient_1a5ddfee38bced0cfafa1b427590f331ef() const ` | ` `` ` |

## Public attributes

### operation

```
Operation operation
```

## Public functions

### SparseAccumulatorApplyGradient

```
 SparseAccumulatorApplyGradient(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input handle,
  ::tensorflow::Input local_step,
  ::tensorflow::Input gradient_indices,
  ::tensorflow::Input gradient_values,
  ::tensorflow::Input gradient_shape,
  bool has_known_shape
)
```

### operator::tensorflow::Operation

```
 operator::tensorflow::Operation() const 
```