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 a batch of actions given observations and latents.
  
  Args:
      observations (np.ndarray): Observations from the environment, with
          shape :math:`(T, O)`. T is the number of environment steps, O
          is the dimension of observation.
      latents (np.ndarray): Latents, with shape :math:`(T, Z)`. T is the
          number of environment steps, Z is the dimension of
          latent embedding.
  
  Returns:
      np.ndarray: Actions sampled from the policy,
          with shape :math:`(T, A)`. T is the number of environment
          steps, A is the dimension of action.
      dict: Action distribution information.
docstr_tok: ["Sample","a","batch","of","actions","given","observations","and","latents",".","Args",":","observations","(","np.ndarray",")",":","Observations","from","the","environment",",","with","shape",":","math",":","`","(","T",",","O",")","`",".","T","is","the","number","of","environment","steps",",","O","is","the","dimension","of","observation",".","latents","(","np.ndarray",")",":","Latents",",","with","shape",":","math",":","`","(","T",",","Z",")","`",".","T","is","the","number","of","environment","steps",",","Z","is","the","dimension","of","latent","embedding",".","Returns",":","np.ndarray",":","Actions","sampled","from","the","policy",",","with","shape",":","math",":","`","(","T",",","A",")","`",".","T","is","the","number","of","environment","steps",",","A","is","the","dimension","of","action",".","dict",":","Action","distribution","information","."]
code: def get_actions_given_latents(self, observations, latents):
      """Sample a batch of actions given observations and latents.
  
      Args:
          observations (np.ndarray): Observations from the environment, with
              shape :math:`(T, O)`. T is the number of environment steps, O
              is the dimension of observation.
          latents (np.ndarray): Latents, with shape :math:`(T, Z)`. T is the
              number of environment steps, Z is the dimension of
              latent embedding.
  
      Returns:
          np.ndarray: Actions sampled from the policy,
              with shape :math:`(T, A)`. T is the number of environment
              steps, 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 12 for calling the TaskEmbeddingPolicy obj's underlying member method code with example usage: obj.get_actions_given_latents(observations, latents) without return types