def infer_action(self, raw_obs, ids, policy='e_greedy', eps=0):
        """infer action for a batch of agents

        Parameters
        ----------
        raw_obs: tuple(numpy array, numpy array)
            raw observation of agents tuple(views, features)
        ids: numpy array
            ids of agents
        policy: str
            can be eps-greedy or greedy
        eps: float
            used when policy is eps-greedy

        Returns
        -------
        acts: numpy array of int32
            actions for agents
        """
        view, feature = raw_obs[0], raw_obs[1]

        if policy == 'e_greedy':
            eps = eps
        elif policy == 'greedy':
            eps = 0

        n = len(view)
        batch_size = min(n, self.infer_batch_size)

        if self.num_gpu > 1 and n > batch_size:   # infer by multi gpu in parallel
            ret = self._infer_multi_gpu(view, feature, ids, eps)
        else:                  # infer by splitting big batch in serial
            ret = []
            for i in range(0, n, batch_size):
                beg, end = i, i + batch_size
                ret.append(self.sess.run(self.output_action, feed_dict={
                    self.input_view: view[beg:end],
                    self.input_feature: feature[beg:end],
                    self.eps: eps}))
            ret = np.concatenate(ret)
        return ret
infer action for a batch of agents

        Parameters
        ----------
        raw_obs: tuple(numpy array, numpy array)
            raw observation of agents tuple(views, features)
        ids: numpy array
            ids of agents
        policy: str
            can be eps-greedy or greedy
        eps: float
            used when policy is eps-greedy

        Returns
        -------
        acts: numpy array of int32
            actions for agents
        
python/magent/builtin/tf_model/dqn.py