# tf_agents.policies.utils.bandit_policy_uniform_mask

<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/agents/blob/v0.19.0/tf_agents/policies/utils.py#L316-L336) |

Set bandit policy type tensor to BanditPolicyType.UNIFORM based on mask.

    tf_agents.policies.utils.bandit_policy_uniform_mask(
        values: https://www.tensorflow.org/agents/api_docs/python/tf_agents/typing/types/Tensor,
        mask: https://www.tensorflow.org/agents/api_docs/python/tf_agents/typing/types/Tensor
    ) -> https://www.tensorflow.org/agents/api_docs/python/tf_agents/typing/types/Tensor

Set bandit policy type `values` to BanditPolicyType.UNIFORM; returns tensor
where output\[i\] is BanditPolicyType.UNIFORM if mask\[i\] is True, otherwise it
is left as values\[i\].

<br />

<br />

<br />

| ## Args ||
|---|---|
| `values` | Tensor containing `BanditPolicyType` enumerations. |
| `mask` | Tensor of the same shape as `values` with boolean flags indicating values to set to [`BanditPolicyType.UNIFORM`](https://www.tensorflow.org/agents/api_docs/python/tf_agents/policies/utils/BanditPolicyType#UNIFORM). |

<br />

<br />

<br />

<br />

| ## Returns ||
|---|---|
| Tensor containing `BanditPolicyType` enumerations with masked values. ||

<br />