docstr: Performs the composition described above.
  These are the actions being put into the replay buffer, not necessary
  the actions taken by the environment!
docstr_tok: ["Performs","the","composition","described","above",".","These","are","the","actions","being","put","into","the","replay","buffer",",","not","necessary","the","actions","taken","by","the","environment","!"]
code: def act(
      self,
      obs: Any,
      possible_actions_mask: Optional[torch.Tensor] = None,
  ) -> rlt.ActorOutput:
      """
      Performs the composition described above.
      These are the actions being put into the replay buffer, not necessary
      the actions taken by the environment!
      """
      scorer_inputs = (obs,)
      if possible_actions_mask is not None:
          scorer_inputs += (possible_actions_mask,)
      scores = self.scorer(*scorer_inputs)
      actor_output = self.sampler.sample_action(scores)
      return actor_output.cpu().detach()
  
imports: from typing import Any, Optional
  import reagent.core.types
  import torch
  from reagent.gym.types import Sampler, Scorer
label_desc: Use image node_id 2 for calling the Policy obj's underlying member method code with example usage: obj.act(obs, possible_actions_mask) and returns: actor_output