class_docstr: Implementation of 51 Categorical DQN (C51)
  
  See https://arxiv.org/abs/1707.06887 for details
class_docstr_tok: ["Implementation","of","51","Categorical","DQN","(","C51",")","See","https",":","\/\/arxiv.org\/abs\/1707.06887","for","details"]
code: def argmax_with_mask(self, q_values, possible_actions_mask: int):
      # Set q-values of impossible actions to a very large negative number.
      # pyre-fixme[16]: `int` has no attribute `shape`.
      q_values = q_values.reshape(possible_actions_mask.shape)
      q_values = q_values + RLTrainerMixin.ACTION_NOT_POSSIBLE_VAL * (
          1 - possible_actions_mask
      )
      return q_values.argmax(1)
  
file_path: ReAgent/reagent/training/c51_trainer.py
imports: from typing import List
  import reagent.core.types
  import torch
  from reagent.core.configuration import resolve_defaults
  from reagent.core.dataclasses import field
  from reagent.core.parameters import RLParameters
  from reagent.optimizer import Optimizer__Union, SoftUpdate
  from reagent.training.reagent_lightning_module import ReAgentLightningModule
  from reagent.training.rl_trainer_pytorch import RLTrainerMixin
label_desc: Use image node_id 5 for calling the C51Trainer obj's underlying member method code with example usage: obj.argmax_with_mask(q_values, possible_actions_mask) and returns: q_values