class_docstr: Module for embedding (observation, action, reward) inputs together.
docstr: Embed each of the (observation, action, reward) inputs & concatenate.
docstr_tok: ["Embed","each","of","the","(","observation",",","action",",","reward",")","inputs","&","concatenate","."]
code: def __call__(
      self, inputs: observation_action_reward.OAR
  ) -> tf.Tensor:
      """Embed each of the (observation, action, reward) inputs & concatenate."""
  
      # Add dummy trailing dimension to rewards if necessary.
      if len(inputs.reward.shape.dims) == 1:
          inputs = inputs._replace(
              reward=tf.expand_dims(inputs.reward, axis=-1)
          )
  
      features = self._torso(inputs.observation)  # [T?, B, D]
      action = tf.one_hot(
          inputs.action, depth=self._num_actions
      )  # [T?, B, A]
      reward = tf.nn.tanh(inputs.reward)  # [T?, B, 1]
  
      embedding = tf.concat(
          [features, action, reward], axis=-1
      )  # [T?, B, D+A+1]
  
      return embedding
  
file_path: acme/acme/tf/networks/embedding.py
imports: from acme.tf.networks import base
  from acme.wrappers import observation_action_reward
  import sonnet
  import tensorflow
label_desc: Use image node_id 2 for calling the OAREmbedding obj's underlying member method code with example usage: obj.__call__(inputs) and returns: embedding