parameters: (self, observ)
docstring: Compute batch of actions and a summary for a batch of observation.
  
      Args:
        observ: Tensor of a batch of observations for all agents.
  
      Returns:
        Tuple of action batch tensor and summary tensor.
docstring_summary: Compute batch of actions and a summary for a batch of observation.
docstring_tokens: Compute batch of actions and a summary for a batch of observation .
function: def perform(self, observ):
      """Compute batch of actions and a summary for a batch of observation.
  
      Args:
        observ: Tensor of a batch of observations for all agents.
  
      Returns:
        Tuple of action batch tensor and summary tensor.
      """
      with tf.name_scope('perform/'):
        observ = self._observ_filter.transform(observ)
        network = self._network(observ[:, None], tf.ones(observ.shape[0]), self._last_state)
        action = tf.cond(self._is_training, network.policy.sample, lambda: network.mean)
        logprob = network.policy.log_prob(action)[:, 0]
        # pylint: disable=g-long-lambda
        summary = tf.cond(
            self._should_log, lambda: tf.summary.merge([
                tf.summary.histogram('mean', network.mean[:, 0]),
                tf.summary.histogram('std', tf.exp(network.logstd[:, 0])),
                tf.summary.histogram('action', action[:, 0]),
                tf.summary.histogram('logprob', logprob)
            ]), str)
        # Remember current policy to append to memory in the experience callback.
        with tf.control_dependencies([
            utility.assign_nested_vars(self._last_state, network.state),
            self._last_action.assign(action[:, 0]),
            self._last_mean.assign(network.mean[:, 0]),
            self._last_logstd.assign(network.logstd[:, 0])
        ]):
          return tf.check_numerics(action[:, 0], 'action'), tf.identity(summary)
function_tokens: def perform ( self , observ ) : with tf . name_scope ( 'perform/' ) : observ = self . _observ_filter . transform ( observ ) network = self . _network ( observ [ : , None ] , tf . ones ( observ . shape [ 0 ] ) , self . _last_state ) action = tf . cond ( self . _is_training , network . policy . sample , lambda : network . mean ) logprob = network . policy . log_prob ( action ) [ : , 0 ] # pylint: disable=g-long-lambda summary = tf . cond ( self . _should_log , lambda : tf . summary . merge ( [ tf . summary . histogram ( 'mean' , network . mean [ : , 0 ] ) , tf . summary . histogram ( 'std' , tf . exp ( network . logstd [ : , 0 ] ) ) , tf . summary . histogram ( 'action' , action [ : , 0 ] ) , tf . summary . histogram ( 'logprob' , logprob ) ] ) , str ) # Remember current policy to append to memory in the experience callback. with tf . control_dependencies ( [ utility . assign_nested_vars ( self . _last_state , network . state ) , self . _last_action . assign ( action [ : , 0 ] ) , self . _last_mean . assign ( network . mean [ : , 0 ] ) , self . _last_logstd . assign ( network . logstd [ : , 0 ] ) ] ) : return tf . check_numerics ( action [ : , 0 ] , 'action' ) , tf . identity ( summary )