Missed TensorFlow Dev Summit? Check out the video playlist. Watch recordings

tf_agents.bandits.policies.policy_utilities.bandit_policy_uniform_mask

View source on GitHub

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

tf_agents.bandits.policies.policy_utilities.bandit_policy_uniform_mask(
    values, mask
)

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].

Args:

  • values: Tensor containing BanditPolicyType enumerations.
  • mask: Tensor of the same shape as values with boolean flags indicating values to set to BanditPolicyType.UNIFORM.

Returns:

Tensor containing BanditPolicyType enumerations with masked values.