class_docstr: Agent of PPO env
  
  Args:
      algorithm (`parl.Algorithm`): algorithm to be used in this agent.
      config (dict): configs that used in this agent
class_docstr_tok: ["Agent","of","PPO","env","Args",":","algorithm","(","`","parl.Algorithm","`",")",":","algorithm","to","be","used","in","this","agent",".","config","(","dict",")",":","configs","that","used","in","this","agent"]
docstr: Sample action from current policy given observation
  
  Args:
      obs (np.array): observation, shape([batch_size] + obs_shape)
docstr_tok: ["Sample","action","from","current","policy","given","observation","Args",":","obs","(","np.array",")",":","observation",",","shape","(","[","batch_size","]","+","obs_shape",")"]
code: def sample(self, obs):
      """Sample action from current policy given observation
  
      Args:
          obs (np.array): observation, shape([batch_size] + obs_shape)
      """
      obs = paddle.to_tensor(obs, dtype="float32")
      value, action, action_log_probs, action_entropy = self.alg.sample(
          obs
      )
  
      value_numpy = value.detach().numpy()
      action_numpy = action.detach().numpy()[0]
      action_log_probs_numpy = action_log_probs.detach().numpy()[0]
      action_entropy_numpy = action_entropy.detach().numpy()
      return (
          value_numpy,
          action_numpy,
          action_log_probs_numpy,
          action_entropy_numpy,
      )
  
file_path: PARL/examples/PPO/agent.py
imports: import parl
  import paddle
  import numpy
  from parl.utils.scheduler import LinearDecayScheduler
label_desc: Use image node_id 3 for calling the PPOAgent obj's underlying member method code with example usage: obj.sample(obs) and returns: value_numpy,  action_numpy,  action_log_probs_numpy,  action_entropy_numpy