class_docstr: A network that takes global and arm observations and outputs rewards.
  
  This network takes the output of the global and per-arm networks, and leads
  them through a common network, that in turn outputs reward estimates.
class_docstr_tok: ["A","network","that","takes","global","and","arm","observations","and","outputs","rewards",".","This","network","takes","the","output","of","the","global","and","per-arm","networks",",","and","leads","them","through","a","common","network",",","that","in","turn","outputs","reward","estimates","."]
docstr: Runs the observation through the network.
docstr_tok: ["Runs","the","observation","through","the","network","."]
code: def call(self, observation, step_type=None, network_state=()):
      """Runs the observation through the network."""
  
      global_obs = observation[bandit_spec_utils.GLOBAL_FEATURE_KEY]
      arm_obs = observation[bandit_spec_utils.PER_ARM_FEATURE_KEY]
      arm_output, arm_state = self._arm_network(
          arm_obs, step_type=step_type, network_state=network_state
      )
  
      # Reshape arm output to rank 3 tensor.
      arm_output_shape = tf.shape(arm_output)
      batch_size = arm_output_shape[0]
      inner_dim = 1
      outer_dim = arm_output_shape[-1]
      if arm_output.shape.rank > 2:
          # Cannot have undefined inner dimension in arm output shape.
          inner_dims = arm_output.shape[1:-1]
          if any(d is None for d in inner_dims):
              raise ValueError(
                  "inner dimensions of arm output cannot be unknown; "
                  f"arm_output.shape: {arm_output.shape}"
              )
          inner_dim = np.prod(inner_dims)
      arm_output = tf.reshape(
          arm_output, shape=[batch_size, inner_dim, outer_dim]
      )
  
      global_output, global_state = self._global_network(
          global_obs, step_type=step_type, network_state=network_state
      )
  
      num_actions = tf.shape(arm_output)[1]
      global_output = tf.tile(
          tf.expand_dims(global_output, axis=1), [1, num_actions, 1]
      )
  
      common_input = tf.concat([global_output, arm_output], axis=-1)
  
      output, state = self._common_network(
          common_input, (global_state, arm_state)
      )
      if isinstance(self._common_network, q_network.QNetwork):
          output = tf.squeeze(output, axis=-1)
      return output, state
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from typing import Callable, Optional, Sequence, Text
  import gin
  import numpy
  import tensorflow
  from tf_agents.bandits.specs import utils
  from tf_agents.networks import encoding_network
  from tf_agents.networks import network
  from tf_agents.networks import q_network
  from tf_agents.specs import tensor_spec
  from tf_agents.typing import types
label_desc: Use image node_id 2 for calling the GlobalAndArmCommonTowerNetwork obj's underlying member method code with example usage: obj.call(observation, step_type, network_state) and returns: output,  state