class_docstr: Base class for Task Embedding policies in TensorFlow.
  
  This policy needs a task id in addition to observation to sample an action.
class_docstr_tok: ["Base","class","for","Task","Embedding","policies","in","TensorFlow",".","This","policy","needs","a","task","id","in","addition","to","observation","to","sample","an","action","."]
docstr: Sample an action given observation and latent.
  
  Args:
      observation (np.ndarray): Observation from the environment,
          with shape :math:`(O, )`. O is the dimension of observation.
      latent (np.ndarray): Latent, with shape :math:`(Z, )`. Z is the
          dimension of latent embedding.
  
  Returns:
      np.ndarray: Action sampled from the policy,
          with shape :math:`(A, )`. A is the dimension of action.
      dict: Action distribution information.
docstr_tok: ["Sample","an","action","given","observation","and","latent",".","Args",":","observation","(","np.ndarray",")",":","Observation","from","the","environment",",","with","shape",":","math",":","`","(","O",",",")","`",".","O","is","the","dimension","of","observation",".","latent","(","np.ndarray",")",":","Latent",",","with","shape",":","math",":","`","(","Z",",",")","`",".","Z","is","the","dimension","of","latent","embedding",".","Returns",":","np.ndarray",":","Action","sampled","from","the","policy",",","with","shape",":","math",":","`","(","A",",",")","`",".","A","is","the","dimension","of","action",".","dict",":","Action","distribution","information","."]
code: def get_action_given_latent(self, observation, latent):
      """Sample an action given observation and latent.
  
      Args:
          observation (np.ndarray): Observation from the environment,
              with shape :math:`(O, )`. O is the dimension of observation.
          latent (np.ndarray): Latent, with shape :math:`(Z, )`. Z is the
              dimension of latent embedding.
  
      Returns:
          np.ndarray: Action sampled from the policy,
              with shape :math:`(A, )`. A is the dimension of action.
          dict: Action distribution information.
  
      """
  
file_path: garage/src/garage/tf/policies/task_embedding_policy.py
imports: import abc
  from garage.tf.policies.policy import Policy
label_desc: Use image node_id 11 for calling the TaskEmbeddingPolicy obj's underlying member method code with example usage: obj.get_action_given_latent(observation, latent) without return types