docstr: Args:
      obs_np: a numpy float32 array of shape ([B] + observation_space).
              Format of image input should be NCHW format.
      actions_np: a numpy int64 array of shape [B]
      advantages_np: a numpy float32 array of shape [B]
      target_values_np: a numpy float32 array of shape [B]
docstr_tok: ["Args",":","obs_np",":","a","numpy","float32","array","of","shape","(","[","B","]","+","observation_space",")",".","Format","of","image","input","should","be","NCHW","format",".","actions_np",":","a","numpy","int64","array","of","shape","[","B","]","advantages_np",":","a","numpy","float32","array","of","shape","[","B","]","target_values_np",":","a","numpy","float32","array","of","shape","[","B","]"]
code: def learn(self, obs_np, actions_np, advantages_np, target_values_np):
      """
      Args:
          obs_np: a numpy float32 array of shape ([B] + observation_space).
                  Format of image input should be NCHW format.
          actions_np: a numpy int64 array of shape [B]
          advantages_np: a numpy float32 array of shape [B]
          target_values_np: a numpy float32 array of shape [B]
      """
  
      obs_np = paddle.to_tensor(obs_np, dtype="float32")
      actions_np = paddle.to_tensor(actions_np, dtype="int64")
      advantages_np = paddle.to_tensor(advantages_np, dtype="float32")
      target_values_np = paddle.to_tensor(
          target_values_np, dtype="float32"
      )
  
      lr = self.lr_scheduler.step(step_num=obs_np.shape[0])
      entropy_coeff = self.entropy_coeff_scheduler.step()
      total_loss, pi_loss, vf_loss, entropy = self.alg.learn(
          obs_np,
          actions_np,
          advantages_np,
          target_values_np,
          lr,
          entropy_coeff,
      )
  
      return (
          total_loss.cpu().numpy(),
          pi_loss.cpu().numpy(),
          vf_loss.cpu().numpy(),
          entropy.cpu().numpy(),
          lr,
          entropy_coeff,
      )
  
file_path: PARL/examples/A2C/atari_agent.py
imports: import numpy
  import parl
  from parl.utils import machine_info
  from parl.utils.scheduler import PiecewiseScheduler, LinearDecayScheduler
  import paddle
label_desc: Use image node_id 5 for calling the AtariAgent obj's underlying member method code with example usage: obj.learn(obs_np, actions_np, advantages_np, target_values_np) and returns: total_loss,  pi_loss,  vf_loss,  entropy,  lr,  entropy_coeff