def _build_multi_gpu_infer(self, num_gpu):
        """build inference graph for multi gpus"""
        self.infer_qvalues = []
        self.infer_input_view = []
        self.infer_input_feature = []
        for i in range(num_gpu):
            self.infer_input_view.append(tf.placeholder(tf.float32, (None,) + self.view_space))
            self.infer_input_feature.append(tf.placeholder(tf.float32, (None,) + self.feature_space))
            with tf.variable_scope("eval_net_scope"), tf.device("/gpu:%d" % i):
                self.infer_qvalues.append(self._create_network(self.infer_input_view[i],
                                                               self.infer_input_feature[i], reuse=True))
build inference graph for multi gpus
python/magent/builtin/tf_model/dqn.py