class_docstr: This class computes the loss function for A2C with discrete action spaces.
class_docstr_tok: ["This","class","computes","the","loss","function","for","A2C","with","discrete","action","spaces","."]
code: def __init__(
      self, value_weight, entropy_weight, action_prob_index, value_index
  ):
      self.value_weight = value_weight
      self.entropy_weight = entropy_weight
      self.action_prob_index = action_prob_index
      self.value_index = value_index
  
imports: import time
  from collections.abc import Sequence
  import numpy
  import tensorflow
  from deepchem.models import KerasModel
  from deepchem.models.optimizers import Adam
label_desc: Use image node_id 1 to create a new A2CLossDiscrete object from inherited base classes: object with example: obj = A2CLossDiscrete(value_weight, entropy_weight, action_prob_index, value_index)