# tensorflow::ops::SparseConditionalAccumulator Class Reference

# tensorflow::
ops::
SparseConditionalAccumulator

`
#include <data_flow_ops.h>
`


A conditional accumulator for aggregating sparse gradients.

## Summary


The accumulator accepts gradients marked with local_step greater or equal to the most recent global_step known to the accumulator. The average can be extracted from the accumulator, provided sufficient gradients have been accumulated. Extracting the average automatically resets the aggregate to 0, and increments the global_step recorded by the accumulator.


Args:

- scope: A [Scope](https://www.tensorflow.org/versions/r2.5/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope) object
- dtype: The type of the value being accumulated.
- shape: The shape of the values.

<br />


Optional attributes (see
`
https://www.tensorflow.org/versions/r2.5/api_docs/cc/struct/tensorflow/ops/sparse-conditional-accumulator/attrs#structtensorflow_1_1ops_1_1_sparse_conditional_accumulator_1_1_attrs
`
):

- container: If non-empty, this accumulator is placed in the given container. Otherwise, a default container is used.
- shared_name: If non-empty, this accumulator will be shared under the given name across multiple sessions.

<br />


Returns:

- `
  https://www.tensorflow.org/versions/r2.5/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output
  ` : The handle to the accumulator.

<br />

| ### Constructors and Destructors ||
|---|---|
| ` https://www.tensorflow.org/versions/r2.5/api_docs/cc/class/tensorflow/ops/sparse-conditional-accumulator#classtensorflow_1_1ops_1_1_sparse_conditional_accumulator_1a4133d47c6e15c4a9aeefec18ecdcec8e (const :: https://www.tensorflow.org/versions/r2.5/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope & scope, DataType dtype, PartialTensorShape shape) ` ||
| ` https://www.tensorflow.org/versions/r2.5/api_docs/cc/class/tensorflow/ops/sparse-conditional-accumulator#classtensorflow_1_1ops_1_1_sparse_conditional_accumulator_1accae7d9bc21410b017b23f3274a9bb5c (const :: https://www.tensorflow.org/versions/r2.5/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope & scope, DataType dtype, PartialTensorShape shape, const https://www.tensorflow.org/versions/r2.5/api_docs/cc/struct/tensorflow/ops/sparse-conditional-accumulator/attrs#structtensorflow_1_1ops_1_1_sparse_conditional_accumulator_1_1_attrs & attrs) ` ||

| ### Public attributes ||
|---|---|
| ` https://www.tensorflow.org/versions/r2.5/api_docs/cc/class/tensorflow/ops/sparse-conditional-accumulator#classtensorflow_1_1ops_1_1_sparse_conditional_accumulator_1ae254a334398940972605109db3c7954d ` | ` :: https://www.tensorflow.org/versions/r2.5/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output ` |
| ` https://www.tensorflow.org/versions/r2.5/api_docs/cc/class/tensorflow/ops/sparse-conditional-accumulator#classtensorflow_1_1ops_1_1_sparse_conditional_accumulator_1ad8d5c853cb09f54c21878ddca9b9f600 ` | ` https://www.tensorflow.org/versions/r2.5/api_docs/cc/class/tensorflow/operation#classtensorflow_1_1_operation ` |

| ### Public functions ||
|---|---|
| ` https://www.tensorflow.org/versions/r2.5/api_docs/cc/class/tensorflow/ops/sparse-conditional-accumulator#classtensorflow_1_1ops_1_1_sparse_conditional_accumulator_1aba524ddfd366dcef3f9dd99bcb7b5c7d () const ` | ` ::tensorflow::Node * ` |
| ` https://www.tensorflow.org/versions/r2.5/api_docs/cc/class/tensorflow/ops/sparse-conditional-accumulator#classtensorflow_1_1ops_1_1_sparse_conditional_accumulator_1a5e355e5910304b5edd44ef6a51abd472 () const ` | ` ` |
| ` https://www.tensorflow.org/versions/r2.5/api_docs/cc/class/tensorflow/ops/sparse-conditional-accumulator#classtensorflow_1_1ops_1_1_sparse_conditional_accumulator_1a39a61597615354b5d7b73dd9a23cdc8b () const ` | ` ` |

| ### Public static functions ||
|---|---|
| ` https://www.tensorflow.org/versions/r2.5/api_docs/cc/class/tensorflow/ops/sparse-conditional-accumulator#classtensorflow_1_1ops_1_1_sparse_conditional_accumulator_1a1600abd8fa3fea5d2d36ccd67de401c7 (StringPiece x) ` | ` https://www.tensorflow.org/versions/r2.5/api_docs/cc/struct/tensorflow/ops/sparse-conditional-accumulator/attrs#structtensorflow_1_1ops_1_1_sparse_conditional_accumulator_1_1_attrs ` |
| ` https://www.tensorflow.org/versions/r2.5/api_docs/cc/class/tensorflow/ops/sparse-conditional-accumulator#classtensorflow_1_1ops_1_1_sparse_conditional_accumulator_1a280e4c1312be92c2d72875d9cbb6bb80 (StringPiece x) ` | ` https://www.tensorflow.org/versions/r2.5/api_docs/cc/struct/tensorflow/ops/sparse-conditional-accumulator/attrs#structtensorflow_1_1ops_1_1_sparse_conditional_accumulator_1_1_attrs ` |
| ` https://www.tensorflow.org/versions/r2.5/api_docs/cc/class/tensorflow/ops/sparse-conditional-accumulator#classtensorflow_1_1ops_1_1_sparse_conditional_accumulator_1aa7defbdbb0837b0af6dc7fb714603e50 (StringPiece x) ` | ` https://www.tensorflow.org/versions/r2.5/api_docs/cc/struct/tensorflow/ops/sparse-conditional-accumulator/attrs#structtensorflow_1_1ops_1_1_sparse_conditional_accumulator_1_1_attrs ` |

| ### Structs ||
|---|---|
| [tensorflow:: ops:: SparseConditionalAccumulator:: Attrs](https://www.tensorflow.org/versions/r2.5/api_docs/cc/struct/tensorflow/ops/sparse-conditional-accumulator/attrs) | Optional attribute setters for [SparseConditionalAccumulator](https://www.tensorflow.org/versions/r2.5/api_docs/cc/class/tensorflow/ops/sparse-conditional-accumulator#classtensorflow_1_1ops_1_1_sparse_conditional_accumulator) . |

## Public attributes

### handle

```
::tensorflow::Output handle
```

### operation

```
Operation operation
```

## Public functions

### SparseConditionalAccumulator

```
 SparseConditionalAccumulator(
  const ::tensorflow::Scope & scope,
  DataType dtype,
  PartialTensorShape shape
)
```

### SparseConditionalAccumulator

```
 SparseConditionalAccumulator(
  const ::tensorflow::Scope & scope,
  DataType dtype,
  PartialTensorShape shape,
  const SparseConditionalAccumulator::Attrs & attrs
)
```

### node

```
::tensorflow::Node * node() const 
```

### operator::tensorflow::Input

```
 operator::tensorflow::Input() const 
```

### operator::tensorflow::Output

```
 operator::tensorflow::Output() const 
```

## Public static functions

### Container

```
Attrs Container(
  StringPiece x
)
```

### ReductionType

```
Attrs ReductionType(
  StringPiece x
)
```

### SharedName

```
Attrs SharedName(
  StringPiece x
)
```