# Module: tf_agents.bandits.policies.constraints

<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/bandits/policies/constraints.py) |

An API for representing constraints.

## Classes

[`class AbsoluteConstraint`](https://www.tensorflow.org/agents/api_docs/python/tf_agents/bandits/policies/constraints/AbsoluteConstraint): Class for representing a trainable absolute value constraint.

[`class BaseConstraint`](https://www.tensorflow.org/agents/api_docs/python/tf_agents/bandits/policies/constraints/BaseConstraint): Abstract base class for representing constraints.

[`class InputNetworkConstraint`](https://www.tensorflow.org/agents/api_docs/python/tf_agents/bandits/policies/constraints/InputNetworkConstraint): Class for representing a constraint using an input network.

[`class NeuralConstraint`](https://www.tensorflow.org/agents/api_docs/python/tf_agents/bandits/policies/constraints/NeuralConstraint): Class for representing a trainable constraint using a neural network.

[`class QuantileConstraint`](https://www.tensorflow.org/agents/api_docs/python/tf_agents/bandits/policies/constraints/QuantileConstraint): Class for representing a trainable quantile constraint.

[`class RelativeConstraint`](https://www.tensorflow.org/agents/api_docs/python/tf_agents/bandits/policies/constraints/RelativeConstraint): Class for representing a trainable relative constraint.

[`class RelativeQuantileConstraint`](https://www.tensorflow.org/agents/api_docs/python/tf_agents/bandits/policies/constraints/RelativeQuantileConstraint): Class for representing a trainable relative quantile constraint.

## Functions

[`compute_feasibility_probability(...)`](https://www.tensorflow.org/agents/api_docs/python/tf_agents/bandits/policies/constraints/compute_feasibility_probability): Helper function to compute the action feasibility probability.

[`construct_mask_from_multiple_sources(...)`](https://www.tensorflow.org/agents/api_docs/python/tf_agents/bandits/policies/constraints/construct_mask_from_multiple_sources): Constructs an action mask from multiple sources.

<br />

<br />

<br />

| ## Other Members ||
|---|---|
| absolute_import | Instance of `__future__._Feature` |
| division | Instance of `__future__._Feature` |
| print_function | Instance of `__future__._Feature` |

<br />