<br />

> [!NOTE]
> **Note:** This API is new and only available via `pip install tf-nightly`.

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/tensorflow/blob/master/tensorflow/python/tpu/tpu_embedding_v2_utils.py#L1254-L1316) |

Positional weighted combiner for TPU embeddings on SparseCore.

#### View aliases


**Compat aliases for migration**

See
[Migration guide](https://www.tensorflow.org/guide/migrate) for
more details.

[`tf.compat.v1.tpu.experimental.embedding.PositionalWeightedCombiner`](https://www.tensorflow.org/api_docs/python/tf/tpu/experimental/embedding/PositionalWeightedCombiner)

<br />

    tf.tpu.experimental.embedding.PositionalWeightedCombiner(
        max_valency: int,
        initializer: init_ops_v2.Initializer,
        custom_optimizer: https://www.tensorflow.org/api_docs/python/tf/tpu/experimental/embedding/CustomOptimizer
    ) -> Any

This class specifies a positional weighted sum combiner over the TPU embedding
lookup results. It also supports a custom optimizer computation to be
performed on the positional weights.

<br />

<br />

<br />

| ## Args ||
|---|---|
| `max_valency` | The valency cap of the corresponding feature. This value is also used as the number of positional weights. |
| `initializer` | The initializer for the positional weights. |
| `custom_optimizer` | CustomOptimizer encapsulating the custom optimizer computation, learning rate, slot names, slot initializers, and hyperparameters. |

<br />

<br />

<br />

<br />

| ## Attributes ||
|---|---|
| `hyperparameters` | <br /> <br /> |

<br />

## Methods

### `__eq__`

[View source](https://github.com/tensorflow/tensorflow/blob/master/tensorflow/python/tpu/tpu_embedding_v2_utils.py#L122-L129)

    __eq__(
        other: Any
    ) -> Union[Any, bool]

Return self==value.