# tensorflow::ops::SparseSegmentSqrtNWithNumSegments Class Reference

# tensorflow::ops::SparseSegmentSqrtNWithNumSegments

`#include <math_ops.h>`

Computes the sum along sparse segments of a tensor divided by the sqrt of N.

## Summary

N is the size of the segment being reduced.

Like `https://www.tensorflow.org/versions/r2.3/api_docs/cc/class/tensorflow/ops/sparse-segment-sqrt-n#classtensorflow_1_1ops_1_1_sparse_segment_sqrt_n`, but allows missing ids in `segment_ids`. If an id is missing, the `output` tensor at that position will be zeroed.

Read [the section on segmentation](https://tensorflow.org/api_docs/python/tf/math#Segmentation) for an explanation of segments.

Arguments:

- scope: A [Scope](https://www.tensorflow.org/versions/r2.3/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope) object
- indices: A 1-D tensor. Has same rank as `segment_ids`.
- segment_ids: A 1-D tensor. Values should be sorted and can be repeated.
- num_segments: Should equal the number of distinct segment IDs.

<br />

Returns:

- `https://www.tensorflow.org/versions/r2.3/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output`: Has same shape as data, except for dimension 0 which has size `k`, the number of segments.

<br />

| ### Constructors and Destructors ||
|---|---|
| `https://www.tensorflow.org/versions/r2.3/api_docs/cc/class/tensorflow/ops/sparse-segment-sqrt-n-with-num-segments#classtensorflow_1_1ops_1_1_sparse_segment_sqrt_n_with_num_segments_1a44628573cc0d7a5d5f1e052fca589e99(const ::https://www.tensorflow.org/versions/r2.3/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope & scope, ::https://www.tensorflow.org/versions/r2.3/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input data, ::https://www.tensorflow.org/versions/r2.3/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input indices, ::https://www.tensorflow.org/versions/r2.3/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input segment_ids, ::https://www.tensorflow.org/versions/r2.3/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input num_segments)` ||

| ### Public attributes ||
|---|---|
| `https://www.tensorflow.org/versions/r2.3/api_docs/cc/class/tensorflow/ops/sparse-segment-sqrt-n-with-num-segments#classtensorflow_1_1ops_1_1_sparse_segment_sqrt_n_with_num_segments_1a52c0c9df8a62e1641e0046f28df5c10d` | `https://www.tensorflow.org/versions/r2.3/api_docs/cc/class/tensorflow/operation#classtensorflow_1_1_operation` |
| `https://www.tensorflow.org/versions/r2.3/api_docs/cc/class/tensorflow/ops/sparse-segment-sqrt-n-with-num-segments#classtensorflow_1_1ops_1_1_sparse_segment_sqrt_n_with_num_segments_1a867a58de56787260c7fd1d9d19d4b1d5` | `::https://www.tensorflow.org/versions/r2.3/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output` |

| ### Public functions ||
|---|---|
| `https://www.tensorflow.org/versions/r2.3/api_docs/cc/class/tensorflow/ops/sparse-segment-sqrt-n-with-num-segments#classtensorflow_1_1ops_1_1_sparse_segment_sqrt_n_with_num_segments_1acb321311f506a64be7d944bb1473a74d() const ` | `::tensorflow::Node *` |
| `https://www.tensorflow.org/versions/r2.3/api_docs/cc/class/tensorflow/ops/sparse-segment-sqrt-n-with-num-segments#classtensorflow_1_1ops_1_1_sparse_segment_sqrt_n_with_num_segments_1ab82167559d0a3e1be21f18c31272e6a8() const ` | ` `` ` |
| `https://www.tensorflow.org/versions/r2.3/api_docs/cc/class/tensorflow/ops/sparse-segment-sqrt-n-with-num-segments#classtensorflow_1_1ops_1_1_sparse_segment_sqrt_n_with_num_segments_1a29951f747e60f40b1657638181d5ab40() const ` | ` `` ` |

## Public attributes

### operation

```
Operation operation
```

### output

```
::tensorflow::Output output
```

## Public functions

### SparseSegmentSqrtNWithNumSegments

```
 SparseSegmentSqrtNWithNumSegments(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input data,
  ::tensorflow::Input indices,
  ::tensorflow::Input segment_ids,
  ::tensorflow::Input num_segments
)
```

### node

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

### operator::tensorflow::Input

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

### operator::tensorflow::Output

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