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: Get embedded task id in latent space.
  
  Args:
      task_id (np.ndarray): One-hot task id, with shape :math:`(N, )`. N
          is the number of tasks.
  
  Returns:
      np.ndarray: An embedding sampled from embedding distribution, with
          shape :math:`(Z, )`. Z is the dimension of the latent
          embedding.
      dict: Embedding distribution information.
docstr_tok: ["Get","embedded","task","id","in","latent","space",".","Args",":","task_id","(","np.ndarray",")",":","One-hot","task","id",",","with","shape",":","math",":","`","(","N",",",")","`",".","N","is","the","number","of","tasks",".","Returns",":","np.ndarray",":","An","embedding","sampled","from","embedding","distribution",",","with","shape",":","math",":","`","(","Z",",",")","`",".","Z","is","the","dimension","of","the","latent","embedding",".","dict",":","Embedding","distribution","information","."]
code: def get_latent(self, task_id):
      """Get embedded task id in latent space.
  
      Args:
          task_id (np.ndarray): One-hot task id, with shape :math:`(N, )`. N
              is the number of tasks.
  
      Returns:
          np.ndarray: An embedding sampled from embedding distribution, with
              shape :math:`(Z, )`. Z is the dimension of the latent
              embedding.
          dict: Embedding distribution information.
  
      """
      return self.encoder.get_latent(task_id)
  
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 2 for calling the TaskEmbeddingPolicy obj's underlying member method code with example usage: obj.get_latent(task_id) and returns: self