def _infer_multi_gpu(self, view, feature, ids, eps):
        """infer action by multi gpu in parallel """
        ret = []
        beg = 0
        while beg < len(view):
            feed_dict = {self.eps: eps}
            for i in range(self.num_gpu):
                end = beg + self.infer_batch_size
                feed_dict[self.infer_input_view[i]] = view[beg:end]
                feed_dict[self.infer_input_feature[i]] = feature[beg:end]
                beg += self.infer_batch_size

            ret.extend(self.sess.run(self.infer_out_action, feed_dict=feed_dict))
        return np.concatenate(ret)
infer action by multi gpu in parallel 
python/magent/builtin/tf_model/dqn.py