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)
        if n < self.num_gpu:
            view = np.tile(view, (self.num_gpu, 1, 1, 1))
            feature = np.tile(feature, (self.num_gpu, 1))

        batch_size = min(len(view), self.infer_batch_size)
        self._reset_bind_size(batch_size)
        best_actions = []
        infer_iter = mx.io.NDArrayIter(data=[view, feature], batch_size=batch_size)
        for batch in infer_iter:
            self.model.forward(batch, is_train=False)
            qvalue_batch = self.model.get_outputs()[0]
            batch_action = mx.nd.argmax(qvalue_batch, axis=1)
            best_actions.append(batch_action)
        best_actions = np.array([x.asnumpy() for x in best_actions]).flatten()
        best_actions = best_actions[:n]

        random = np.random.randint(self.num_actions, size=(n,))
        cond = np.random.uniform(0, 1, size=(n,)) < eps
        ret = np.where(cond, random, best_actions)

        return ret.astype(np.int32)
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/mx_model/dqn.py