|View source on GitHub|
Constructs an action mask from multiple sources.
tf_agents.bandits.policies.policy_utilities.construct_mask_from_multiple_sources( observation, observation_and_action_constraint_splitter, constraints, max_num_actions )
The sources include:
-- The action mask encoded in the observation,
num_actions feature restricting the number of actions per sample,
-- the feasibility mask implied by constraints.
The resulting mask disables all actions that are masked out in any of the three sources.
||A nest of Tensors containing the observation.|
||The observation action mask splitter function if the observation has action mask.|
Iterable of constraints objects that are instances of
||The maximum number of actions per sample.|
An action mask in the form of a